Fix AstroComponent check (#1849)

This commit is contained in:
Jonathan Neal 2021-11-17 18:33:04 -05:00 committed by GitHub
parent 7275212e5f
commit 4879c8b2b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,7 @@ async function _render(child: any): Promise<any> {
}
// Add a comment explaining why each of these are needed.
// Maybe create clearly named function for what this is doing.
else if (child instanceof AstroComponent || child.toString() === '[object AstroComponent]') {
else if (child instanceof AstroComponent || Object.prototype.toString.call(child) === '[object AstroComponent]') {
return await renderAstroComponent(child);
} else {
return child;