Fix [Object object] in MDX output (#4180)

* fix: use stringifyChunk in `renderToString` fn

* chore: add changeset

Co-authored-by: Nate Moore <nate@astro.build>
This commit is contained in:
Nate Moore 2022-08-05 17:12:18 -05:00 committed by GitHub
parent c9b679e56e
commit c56a9227c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix edge case where Astro component would render [Object object] when using MDX

View file

@ -752,7 +752,7 @@ export async function renderToString(
let html = '';
for await (const chunk of renderAstroComponent(Component)) {
html += chunk;
html += stringifyChunk(result, chunk);
}
return html;
}