Skip to content

Commit bc7aa6f

Browse files
committed
Fix history state error
1 parent 37f9180 commit bc7aa6f

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
@@ -119,6 +119,10 @@ class History {
119119
public saveDocumentScrollPosition(scrollRegion: ScrollRegion): void {
120120
queue.add(() => {
121121
return Promise.resolve().then(() => {
122+
if (!window.history.state?.page) {
123+
return
124+
}
125+
122126
this.doReplaceState(
123127
{
124128
page: window.history.state.page,

0 commit comments

Comments
 (0)