type can be null

This commit is contained in:
Simon Knott 2024-10-01 16:53:40 +02:00
parent 069f8b5eb9
commit 491856b98b
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -40,7 +40,7 @@ function __pwRender(value) {
if (isJsxComponent(v)) {
const component = v;
let type = component.type;
if ('__pw_type' in type && type.__pw_type === 'fragment')
if (type && type.__pw_type === 'fragment')
type = __pwReact.Fragment;
const props = component.props ? __pwRender(component.props) : {};
const key = component.key ? __pwRender(component.key) : undefined;