mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 00:52:01 +00:00
fix(nuxt): call onNuxtReady
callback without arguments (#27428)
This commit is contained in:
parent
115fc2d18f
commit
14fecc9f73
@ -7,8 +7,8 @@ export const onNuxtReady = (callback: () => any) => {
|
|||||||
|
|
||||||
const nuxtApp = useNuxtApp()
|
const nuxtApp = useNuxtApp()
|
||||||
if (nuxtApp.isHydrating) {
|
if (nuxtApp.isHydrating) {
|
||||||
nuxtApp.hooks.hookOnce('app:suspense:resolve', () => { requestIdleCallback(callback) })
|
nuxtApp.hooks.hookOnce('app:suspense:resolve', () => { requestIdleCallback(() => callback()) })
|
||||||
} else {
|
} else {
|
||||||
requestIdleCallback(callback)
|
requestIdleCallback(() => callback())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user