Skip to content

Commit d5e66ea

Browse files
committed
only inherit params if current transition exists (fix #325)
1 parent 50fbc1a commit d5e66ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,9 @@ class Router {
551551
if (path && typeof path === 'object') {
552552
if (path.name) {
553553
const extend = Vue.util.extend
554-
const currentParams = this._currentTransition.to.params
554+
const currentParams =
555+
this._currentTransition &&
556+
this._currentTransition.to.params
555557
const targetParams = path.params || {}
556558
const params = currentParams
557559
? extend(extend({}, currentParams), targetParams)

0 commit comments

Comments
 (0)