refactor: move serializedProps out of string
This commit is contained in:
parent
896ca32d53
commit
9ee36d8ff9
1 changed files with 2 additions and 1 deletions
|
@ -177,8 +177,9 @@ export async function generateHydrateScript(
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const serializedProps = serialize(scriptProps)
|
||||||
const script: SSRElement = {
|
const script: SSRElement = {
|
||||||
children: `Astro.assign(document.currentScript,${serialize(scriptProps)})`,
|
children: `Astro.assign(document.currentScript,${serializedProps})`,
|
||||||
props: { async: '' }
|
props: { async: '' }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue