From: Eduardo San Martin Morote Date: Fri, 7 Jun 2019 08:55:54 +0000 (+0200) Subject: fix(view): correctly freez route, matched non enumerable X-Git-Tag: v4.0.0-alpha.0~347 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=282b401a7771c64e8a9cd86de0a13dc7c10a9034;p=thirdparty%2Fvuejs%2Frouter.git fix(view): correctly freez route, matched non enumerable --- diff --git a/src/router.ts b/src/router.ts index a474513b..ed0d3994 100644 --- a/src/router.ts +++ b/src/router.ts @@ -333,6 +333,9 @@ export class Router { private updateReactiveRoute() { if (!this.app) return - this.app._route = this.currentRoute + // TODO: matched should be non enumerable and the defineProperty here shouldn't be necessary + const route = { ...this.currentRoute } + Object.defineProperty(route, 'matched', { enumerable: false }) + this.app._route = Object.freeze(route) } }