Skip to content

Commit 2a6b7fd

Browse files
committed
feat: Support the use of regular HTML anchor elements for hash routing universes
1 parent 5e63d74 commit 2a6b7fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/core/LocationLite.svelte.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class LocationLite implements Location {
4444
['popstate', 'hashchange'].forEach((event) => {
4545
cleanups.push(on(globalThis.window, event, () => {
4646
this.#innerState.url.href = globalThis.window?.location?.href;
47-
this.#innerState.state = globalThis.window?.history?.state;
47+
this.#innerState.state = globalThis.window?.history?.state ?? this.#innerState.state;
4848
}));
4949
});
5050
return () => {

0 commit comments

Comments
 (0)