refactor(nuxt): remove currentRoute non-ref warning (#25337)

This commit is contained in:
Alexander Lichter 2024-01-19 23:23:03 +01:00 committed by GitHub
parent 10af369436
commit c93c526f50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -160,17 +160,6 @@ export default defineNuxtPlugin<{ route: Route, router: Router }>({
} }
const currentRoute = computed(() => route) 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 = { const router: Router = {
currentRoute, currentRoute,