summaryrefslogtreecommitdiff
path: root/packages/astro/src/frontend/render/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/astro/src/frontend/render/utils.ts')
-rw-r--r--packages/astro/src/frontend/render/utils.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/astro/src/frontend/render/utils.ts b/packages/astro/src/frontend/render/utils.ts
index 29eaf64b5..64a712561 100644
--- a/packages/astro/src/frontend/render/utils.ts
+++ b/packages/astro/src/frontend/render/utils.ts
@@ -42,7 +42,7 @@ export const childrenToH = moize.deep(function childrenToH(renderer: ComponentRe
const simpleTypes = new Set(['number', 'boolean']);
const serializeChild = (child: unknown) => {
- if (typeof child === 'string') return JSON.stringify(child).replace(/<\/script>/gmi, '</script" + ">');
+ if (typeof child === 'string') return JSON.stringify(child).replace(/<\/script>/gim, '</script" + ">');
if (simpleTypes.has(typeof child)) return JSON.stringify(child);
if (child === null) return `null`;
if ((child as any).__SERIALIZED) return (child as any).__SERIALIZED;