Skip to content

Commit

Permalink
refactor(nuxt): remove currentRoute non-ref warning (#25337)
Browse files Browse the repository at this point in the history
  • Loading branch information
manniL committed Jan 19, 2024
1 parent 10af369 commit c93c526
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/nuxt/src/app/plugins/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c93c526

Please sign in to comment.