Skip to content

Commit 0126bcb

Browse files
committed
fix(build): ensure install fn before Vue.use
Fix #3772
1 parent 8a729f9 commit 0126bcb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/router.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,13 @@ function createHref (base: string, fullPath: string, mode) {
282282
return base ? cleanPath(base + '/' + path) : path
283283
}
284284

285-
if (inBrowser && window.Vue) {
286-
window.Vue.use(VueRouter)
287-
}
288-
289285
// We cannot remove this as it would be a breaking change
290286
VueRouter.install = install
291287
VueRouter.version = '__VERSION__'
292288
VueRouter.isNavigationFailure = isNavigationFailure
293289
VueRouter.NavigationFailureType = NavigationFailureType
294290
VueRouter.START_LOCATION = START
291+
292+
if (inBrowser && window.Vue) {
293+
window.Vue.use(VueRouter)
294+
}

0 commit comments

Comments
 (0)