Skip to content

Commit 860b007

Browse files
author
Ryan Klarhölter
committed
fix(scrollBehavior): trigger scroll behavior if same route
close vuejs#1668, vuejs#974
1 parent 7345956 commit 860b007

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/history/base.js

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
isNavigationFailure,
2121
NavigationFailureType
2222
} from '../util/errors'
23+
import { handleScroll } from '../util/scroll'
2324

2425
export class History {
2526
router: Router
@@ -161,6 +162,7 @@ export class History {
161162
route.matched[lastRouteIndex] === current.matched[lastCurrentIndex]
162163
) {
163164
this.ensureURL()
165+
handleScroll(this.router, current, route, false)
164166
return abort(createNavigationDuplicatedError(current, route))
165167
}
166168

0 commit comments

Comments
 (0)