Skip to content

Commit cc6f1ca

Browse files
committed
Update client.js
1 parent 6b3e5fa commit cc6f1ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/kit/src/runtime/client/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2496,7 +2496,7 @@ function _start_router() {
24962496
if (history_index === current_history_index) return;
24972497

24982498
const scroll = scroll_positions[history_index];
2499-
const state = unstringify(event.state[STATES_KEY], app.hooks.transport) ?? {};
2499+
const state = event.state[STATES_KEY] ? unstringify(event.state[STATES_KEY], app.hooks.transport) : {};
25002500
const url = new URL(event.state[PAGE_URL_KEY] ?? location.href);
25012501
const navigation_index = event.state[NAVIGATION_INDEX];
25022502
const is_hash_change = current.url ? strip_hash(location) === strip_hash(current.url) : false;

0 commit comments

Comments
 (0)