mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-20 07:30:57 +00:00
fix(nuxt): check for layout after nextTick
(#25197)
This commit is contained in:
parent
3f4dfb39da
commit
49d4ae6112
@ -1,3 +1,4 @@
|
||||
import { nextTick } from 'vue'
|
||||
import { defineNuxtPlugin } from '../nuxt'
|
||||
import { onNuxtReady } from '../composables/ready'
|
||||
import { useError } from '../composables/error'
|
||||
@ -16,7 +17,7 @@ export default defineNuxtPlugin({
|
||||
}
|
||||
}
|
||||
if (import.meta.server) {
|
||||
nuxtApp.hook('app:rendered', checkIfLayoutUsed)
|
||||
nuxtApp.hook('app:rendered', () => { nextTick(checkIfLayoutUsed) })
|
||||
} else {
|
||||
onNuxtReady(checkIfLayoutUsed)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user