Skip to content

Commit 59b6da3

Browse files
committedAug 6, 2019
fix(link): silence back navigations errors
1 parent 1381850 commit 59b6da3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/components/link.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { warn } from '../util/warn'
99
const toTypes: Array<Function> = [String, Object]
1010
const eventTypes: Array<Function> = [String, Array]
1111

12+
const noop = () => {}
13+
1214
export default {
1315
name: 'RouterLink',
1416
props: {
@@ -68,9 +70,9 @@ export default {
6870
const handler = e => {
6971
if (guardEvent(e)) {
7072
if (this.replace) {
71-
router.replace(location)
73+
router.replace(location, null, noop)
7274
} else {
73-
router.push(location)
75+
router.push(location, null, noop)
7476
}
7577
}
7678
}

0 commit comments

Comments
 (0)