Skip to content

Commit d084f99

Browse files
committed
fix ssr
1 parent 2c24102 commit d084f99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

router/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function useRouteState<T extends {}>(key: string, initial: T) {
9898
const routeState = history.state ?? {};
9999
history.replaceState({ ...routeState, [key]: newvalue }, "");
100100
return newvalue;
101-
}, (history.state?.[key] ?? initial) as unknown as T);
101+
}, (window?.history?.state?.[key] ?? initial) as unknown as T);
102102
}
103103

104104
export const RouterHost = ({

0 commit comments

Comments
 (0)