Fix regression in rendering strings (#4967)
This commit is contained in:
parent
adff3c45f2
commit
e6a881081f
2 changed files with 9 additions and 2 deletions
7
.changeset/breezy-teachers-clean.md
Normal file
7
.changeset/breezy-teachers-clean.md
Normal file
|
@ -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.
|
|
@ -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<any> {
|
|||
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) {
|
||||
|
|
Loading…
Reference in a new issue