Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anshuthopsee committed Oct 20, 2023
1 parent 080ab85 commit 1ee6765
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/hooks/usePathBasedPresetName.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const usePathBasedPresetName = (initialState) => {
const [selectedPreset, setSelectedPreset] = useState(() => getSelectedPreset(initialState.name, pathName));

useEffect(() => {
if (window.location.hash) return;
const joinedWords = joinWords(initialState.name);
history.replaceState(selectedPreset.name, document.title, document.URL.split('#')[0] + `#/${joinedWords}`);
}, []);
Expand Down

0 comments on commit 1ee6765

Please sign in to comment.