diff --git a/packages/astro/src/runtime/server/hydration.ts b/packages/astro/src/runtime/server/hydration.ts index 65edc7f16..2db8550be 100644 --- a/packages/astro/src/runtime/server/hydration.ts +++ b/packages/astro/src/runtime/server/hydration.ts @@ -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: '' } }