🐛 Fix prefetch change data properties case

This commit is contained in:
2025-08-04 17:32:48 +08:00
parent 6bfe784b3f
commit eca9601a89
2 changed files with 2 additions and 2 deletions

View File

@@ -180,7 +180,7 @@ const user = ref<any>(null)
async function fetchUser() { async function fetchUser() {
if (window.DyPrefetch?.Account != null) { if (window.DyPrefetch?.Account != null) {
console.log('[Fetch] Use the pre-rendered account data.') console.log('[Fetch] Use the pre-rendered account data.')
user.value = window.DyPrefetch.Account user.value = window.DyPrefetch.account
return return
} }

View File

@@ -63,7 +63,7 @@ const notFound = ref(false)
async function fetchPost() { async function fetchPost() {
if (window.DyPrefetch?.Post != null) { if (window.DyPrefetch?.Post != null) {
console.log('[Fetch] Use the pre-rendered post data.') console.log('[Fetch] Use the pre-rendered post data.')
post.value = window.DyPrefetch.Post post.value = window.DyPrefetch.post
return return
} }