Skip to content

Commit

Permalink
[broadcast] Cleans broadcast query on startup
Browse files Browse the repository at this point in the history
This fixes @sim51's comment on #181.
  • Loading branch information
jacomyal committed Feb 5, 2025
1 parent 6b5f3b9 commit f966831
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/gephi-lite/src/core/Initialize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ export const Initialize: FC<PropsWithChildren<unknown>> = ({ children }) => {
}
}

// Clean URL:
if (broadcastID) {
const newSearch = new URLSearchParams(location.search);
newSearch.delete("broadcast");
const searchStr = newSearch.toString();
const cleanedURL = location.pathname + (searchStr ? "?" + searchStr : "");
history.replaceState(null, "", cleanedURL);
}

if (showWelcomeModal)
openModal({
component: WelcomeModal,
Expand Down

0 comments on commit f966831

Please sign in to comment.