diff --git a/src/history/html5.ts b/src/history/html5.ts
index c17dc08b1..3b4c8be38 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 f3dfec60f..4187cf771 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],
})