From: Eduardo San Martin Morote Date: Sun, 2 May 2021 16:16:27 +0000 (+0200) Subject: fix(history): make properties enumerable X-Git-Tag: v4.0.7~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e6ebdf75adc1ab662e46835c5b7f078bc68a93b;p=thirdparty%2Fvuejs%2Frouter.git fix(history): make properties enumerable --- diff --git a/src/history/html5.ts b/src/history/html5.ts index c17dc08b..3b4c8be3 100644 --- a/src/history/html5.ts +++ b/src/history/html5.ts @@ -333,10 +333,12 @@ export function createWebHistory(base?: string): RouterHistory { ) Object.defineProperty(routerHistory, 'location', { + enumerable: true, get: () => historyNavigation.location.value, }) Object.defineProperty(routerHistory, 'state', { + enumerable: true, get: () => historyNavigation.state.value, }) diff --git a/src/history/memory.ts b/src/history/memory.ts index f3dfec60..4187cf77 100644 --- a/src/history/memory.ts +++ b/src/history/memory.ts @@ -95,6 +95,7 @@ export function createMemoryHistory(base: string = ''): RouterHistory { } Object.defineProperty(routerHistory, 'location', { + enumerable: true, get: () => queue[position], })