mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 13:48:13 +00:00
refactor(nuxt): remove duplicated check (#26544)
This commit is contained in:
parent
22dfac7bd7
commit
9b243631b4
@ -351,13 +351,11 @@ export function useAsyncData<
|
||||
if (instance && !instance._nuxtOnBeforeMountCbs) {
|
||||
instance._nuxtOnBeforeMountCbs = []
|
||||
const cbs = instance._nuxtOnBeforeMountCbs
|
||||
if (instance) {
|
||||
onBeforeMount(() => {
|
||||
cbs.forEach((cb) => { cb() })
|
||||
cbs.splice(0, cbs.length)
|
||||
})
|
||||
onUnmounted(() => cbs.splice(0, cbs.length))
|
||||
}
|
||||
onBeforeMount(() => {
|
||||
cbs.forEach((cb) => { cb() })
|
||||
cbs.splice(0, cbs.length)
|
||||
})
|
||||
onUnmounted(() => cbs.splice(0, cbs.length))
|
||||
}
|
||||
|
||||
if (fetchOnServer && nuxtApp.isHydrating && (asyncData.error.value || hasCachedData())) {
|
||||
|
Loading…
Reference in New Issue
Block a user