fix(nuxt): await async payload revivers (#25222)

This commit is contained in:
Matej Černý 2024-01-16 11:02:39 +01:00 committed by GitHub
parent fa7685135b
commit 4893d19db8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,7 +102,7 @@ export async function getNuxtClientPayload () {
return {}
}
const inlineData = parsePayload(el.textContent || '')
const inlineData = await parsePayload(el.textContent || '')
const externalData = el.dataset.src ? await _importPayload(el.dataset.src) : undefined
@ -115,8 +115,8 @@ export async function getNuxtClientPayload () {
return payloadCache
}
export function parsePayload (payload: string) {
return parse(payload, useNuxtApp()._payloadRevivers)
export async function parsePayload (payload: string) {
return await parse(payload, useNuxtApp()._payloadRevivers)
}
/**