Skip to content

Commit

Permalink
Fix: v-link always replace instead of push (quasarframework#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
rottmann authored and rstoenescu committed Jun 3, 2017
1 parent 8b4421c commit b10f5aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vue-directives/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ export default {
active: false,
go () {
const fn = () => {
vnode.context.$router[ctx.route.replace ? 'replace' : 'push'](ctx.route)
let action = 'push'
if (typeof ctx.route !== 'string' && ctx.route.replace) {
action = 'replace'
}
vnode.context.$router[action](ctx.route)
}
if (ctx.delay) {
setTimeout(fn, 100)
Expand Down

0 comments on commit b10f5aa

Please sign in to comment.