Skip to content

Commit d43253f

Browse files
boudydegeeryyx990803
authored andcommitted
Fix issue vuejs#345 with undefined for instantiating routes on the beforeCreate method. (vuejs#346)
1 parent 3dfdae5 commit d43253f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ function capture (instance, _, list) {
272272
const isRouterView2 = instance.$vnode && instance.$vnode.data.routerView
273273
if (instance._routerView || isRouterView2) {
274274
ret.isRouterView = true
275-
if (!instance._inactive) {
275+
if (!instance._inactive && instance.$route) {
276276
const matched = instance.$route.matched
277277
const depth = isRouterView2
278278
? instance.$vnode.data.routerViewDepth

0 commit comments

Comments
 (0)