Skip to content

Commit 28f7d58

Browse files
committed
Merge pull request #708 from gaearon/patch-2
[changed] Don't restore scroll position on Forward
2 parents 8a1b630 + e280efd commit 28f7d58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/createRouter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ function createRouter(options) {
344344

345345
// Record the scroll position as early as possible to
346346
// get it before browsers try update it automatically.
347-
if (prevPath && action !== LocationActions.REPLACE)
347+
if (prevPath && action === LocationActions.PUSH)
348348
this.recordScrollPosition(prevPath);
349349

350350
var match = this.match(path);

0 commit comments

Comments
 (0)