mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +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()
|
||||
if (nuxtApp.isHydrating) {
|
||||
nuxtApp.hooks.hookOnce('app:suspense:resolve', () => { requestIdleCallback(callback) })
|
||||
nuxtApp.hooks.hookOnce('app:suspense:resolve', () => { requestIdleCallback(() => callback()) })
|
||||
} else {
|
||||
requestIdleCallback(callback)
|
||||
requestIdleCallback(() => callback())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user