refactor: move serializedProps out of string

This commit is contained in:
Nate Moore 2023-08-15 13:45:07 -05:00
parent 896ca32d53
commit 9ee36d8ff9

View file

@ -177,8 +177,9 @@ export async function generateHydrateScript(
}
});
const serializedProps = serialize(scriptProps)
const script: SSRElement = {
children: `Astro.assign(document.currentScript,${serialize(scriptProps)})`,
children: `Astro.assign(document.currentScript,${serializedProps})`,
props: { async: '' }
}