Skip to content

Commit aa211fb

Browse files
committed
refactor(nuxt): use RouteLocationNormalizedLoadedGeneric internally
1 parent 65267bf commit aa211fb

File tree

1 file changed

+2
-2
lines changed
  • packages/nuxt/src/pages/runtime/plugins

1 file changed

+2
-2
lines changed

packages/nuxt/src/pages/runtime/plugins/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { isReadonly, reactive, shallowReactive, shallowRef } from 'vue'
22
import type { Ref } from 'vue'
3-
import type { RouteLocation, RouteLocationNormalizedLoaded, Router, RouterScrollBehavior } from 'vue-router'
3+
import type { RouteLocationNormalizedLoaded, RouteLocationNormalizedLoadedGeneric, Router, RouterScrollBehavior } from 'vue-router'
44
import { START_LOCATION, createMemoryHistory, createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
55
import { isSamePath, withoutBase } from 'ufo'
66

@@ -124,7 +124,7 @@ const plugin: Plugin<{ router: Router }> = defineNuxtPlugin({
124124
const route = {} as RouteLocationNormalizedLoaded
125125
for (const key in _route.value) {
126126
Object.defineProperty(route, key, {
127-
get: () => _route.value[key as keyof RouteLocation],
127+
get: () => _route.value[key as keyof RouteLocationNormalizedLoadedGeneric],
128128
enumerable: true,
129129
})
130130
}

0 commit comments

Comments
 (0)