Skip to content

Commit

Permalink
fix(build): ensure install fn before Vue.use
Browse files Browse the repository at this point in the history
Fix #3772
  • Loading branch information
posva committed Aug 23, 2022
1 parent 8a729f9 commit 0126bcb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,13 @@ function createHref (base: string, fullPath: string, mode) {
return base ? cleanPath(base + '/' + path) : path
}

if (inBrowser && window.Vue) {
window.Vue.use(VueRouter)
}

// We cannot remove this as it would be a breaking change
VueRouter.install = install
VueRouter.version = '__VERSION__'
VueRouter.isNavigationFailure = isNavigationFailure
VueRouter.NavigationFailureType = NavigationFailureType
VueRouter.START_LOCATION = START

if (inBrowser && window.Vue) {
window.Vue.use(VueRouter)
}

0 comments on commit 0126bcb

Please sign in to comment.