From 71f3694f6cc17a64deadb24fa5503296d381fd9a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 May 2022 08:47:54 -0400 Subject: [PATCH] Provide a better name for tracking if we have added a hydration script --- packages/astro/src/runtime/server/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts index 786ce63af7ae..69c97144b6ce 100644 --- a/packages/astro/src/runtime/server/index.ts +++ b/packages/astro/src/runtime/server/index.ts @@ -25,7 +25,7 @@ const htmlEnumAttributes = /^(contenteditable|draggable|spellcheck|value)$/i; // Note: SVG is case-sensitive! const svgEnumAttributes = /^(autoReverse|externalResourcesRequired|focusable|preserveAlpha)$/i; -const hydrationedRenders = new WeakSet(); +const resultsWithHydrationScript = new WeakSet(); // INVESTIGATE: // 2. Less anys when possible and make it well known when they are needed. @@ -333,8 +333,8 @@ If you're still stuck, please open an issue on GitHub or join us at https://astr // is scoped to a page renderer we can use it as a key to know if the script // has been rendered or not. let script = ''; - if(!hydrationedRenders.has(result)) { - hydrationedRenders.add(result); + if(!resultsWithHydrationScript.has(result)) { + resultsWithHydrationScript.add(result); script = ``; }