Skip to content

Commit f9570db

Browse files
mutooyyx990803
authored andcommitted
Fix popstate handler (#1479)
1 parent 1004b8f commit f9570db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/history/html5.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ export class HTML5History extends History {
1717
}
1818

1919
window.addEventListener('popstate', e => {
20+
const current = this.current
2021
this.transitionTo(getLocation(this.base), route => {
2122
if (expectScroll) {
22-
handleScroll(router, route, this.current, true)
23+
handleScroll(router, route, current, true)
2324
}
2425
})
2526
})

0 commit comments

Comments
 (0)