]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
fix($route): Make $route have an enumerable type (#912)
authorWisdom <pdsu.wwz@foxmail.com>
Wed, 28 Apr 2021 11:39:23 +0000 (19:39 +0800)
committerGitHub <noreply@github.com>
Wed, 28 Apr 2021 11:39:23 +0000 (13:39 +0200)
src/router.ts

index a6d094a00758754923c2e24c93f5bd0f9a0ca260..6395c5eff23a2cecb231c55d20900184541f88a2 100644 (file)
@@ -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),
       })