Skip to content

Commit

Permalink
fix($route): Make $route have an enumerable type (#912)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdsuwwz committed Apr 28, 2021
1 parent 70bebfc commit d90520e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/router.ts
Expand Up @@ -1102,6 +1102,7 @@ export function createRouter(options: RouterOptions): Router {

app.config.globalProperties.$router = router
Object.defineProperty(app.config.globalProperties, '$route', {
enumerable: true,
get: () => unref(currentRoute),
})

Expand Down

0 comments on commit d90520e

Please sign in to comment.