Skip to content

Commit 83b13ca

Browse files
committed
don't try to replace state if we don't currently have one
1 parent 66985bf commit 83b13ca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/core/src/history.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ class History {
101101
public saveScrollPositions(scrollRegions: ScrollRegion[]): void {
102102
queue.add(() => {
103103
return Promise.resolve().then(() => {
104+
if (!window.history.state?.page) {
105+
return
106+
}
107+
104108
this.doReplaceState(
105109
{
106110
page: window.history.state.page,

0 commit comments

Comments
 (0)