mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-19 01:45:53 +00:00
refactor(nuxt): remove currentRoute
non-ref warning (#25337)
This commit is contained in:
parent
10af369436
commit
c93c526f50
@ -160,17 +160,6 @@ export default defineNuxtPlugin<{ route: Route, router: Router }>({
|
||||
}
|
||||
|
||||
const currentRoute = computed(() => route)
|
||||
// TODO: remove this in v3.10
|
||||
for (const key in route) {
|
||||
Object.defineProperty(currentRoute, key, {
|
||||
get () {
|
||||
if (import.meta.dev) {
|
||||
console.warn(`\`currentRoute.${key}\` is deprecated. Use \`currentRoute.value.${key}\` instead.`)
|
||||
}
|
||||
return route[key as keyof Route]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const router: Router = {
|
||||
currentRoute,
|
||||
|
Loading…
Reference in New Issue
Block a user