fix: omit value property of isHydrated in template (#681)
This commit is contained in:
parent
64611083a5
commit
645da2f945
8 changed files with 15 additions and 19 deletions
|
@ -1,14 +1,8 @@
|
|||
export const isHydrated = computed(() => {
|
||||
if (process.server)
|
||||
return { value: false }
|
||||
export const isHydrated = ref(false)
|
||||
|
||||
if (!process.server) {
|
||||
const nuxtApp = useNuxtApp()
|
||||
if (!nuxtApp.isHydrating)
|
||||
return { value: false }
|
||||
|
||||
const hydrated = ref(false)
|
||||
nuxtApp.hooks.hookOnce('app:suspense:resolve', () => {
|
||||
hydrated.value = true
|
||||
isHydrated.value = true
|
||||
})
|
||||
return hydrated
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue