diff --git a/.changeset/breezy-teachers-clean.md b/.changeset/breezy-teachers-clean.md new file mode 100644 index 000000000..f6c841530 --- /dev/null +++ b/.changeset/breezy-teachers-clean.md @@ -0,0 +1,7 @@ +--- +'astro': patch +--- + +Final perf fix from 1.3.0 regression + +A regression in rendering perf happened in 1.3.0. This is the final fix for the underlying issue. diff --git a/packages/astro/src/runtime/server/render/any.ts b/packages/astro/src/runtime/server/render/any.ts index f4ffc21af..1a19ef519 100644 --- a/packages/astro/src/runtime/server/render/any.ts +++ b/packages/astro/src/runtime/server/render/any.ts @@ -1,4 +1,4 @@ -import { escapeHTML, HTMLString, markHTMLString } from '../escape.js'; +import { escapeHTML, isHTMLString, markHTMLString } from '../escape.js'; import { AstroComponent, renderAstroComponent } from './astro.js'; import { SlotString } from './slot.js'; @@ -9,7 +9,7 @@ export async function* renderChild(child: any): AsyncIterable { yield* child.instructions; } yield child; - } else if (child instanceof HTMLString) { + } else if (isHTMLString(child)) { yield child; } else if (Array.isArray(child)) { for (const value of child) {