Skip to content

Commit

Permalink
fix(nuxt): don't check page/layout usage when redirecting (#25628)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Feb 5, 2024
1 parent e33cec9 commit 9dfc0c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/nuxt/src/app/plugins/check-if-layout-used.ts
Expand Up @@ -17,7 +17,7 @@ export default defineNuxtPlugin({
}
}
if (import.meta.server) {
nuxtApp.hook('app:rendered', () => { nextTick(checkIfLayoutUsed) })
nuxtApp.hook('app:rendered', ({ renderResult }) => { renderResult?.html && nextTick(checkIfLayoutUsed) })
} else {
onNuxtReady(checkIfLayoutUsed)
}
Expand Down
Expand Up @@ -19,7 +19,7 @@ export default defineNuxtPlugin({
}

if (import.meta.server) {
nuxtApp.hook('app:rendered', () => { nextTick(checkIfPageUnused) })
nuxtApp.hook('app:rendered', ({ renderResult }) => { renderResult?.html && nextTick(checkIfPageUnused) })
} else {
onNuxtReady(checkIfPageUnused)
}
Expand Down

0 comments on commit 9dfc0c2

Please sign in to comment.