diff --git a/packages/integrations/react/src/server.ts b/packages/integrations/react/src/server.ts index 7da3c4535c93..4ba4cf9cd6eb 100644 --- a/packages/integrations/react/src/server.ts +++ b/packages/integrations/react/src/server.ts @@ -23,7 +23,8 @@ async function check( // Note: there are packages that do some unholy things to create "components". // Checking the $$typeof property catches most of these patterns. if (typeof Component === 'object') { - return Component['$$typeof'].toString().slice('Symbol('.length).startsWith('react'); + const $$typeof = Component['$$typeof']; + return $$typeof != null && $$typeof.toString().slice('Symbol('.length).startsWith('react'); } if (typeof Component !== 'function') return false; if (Component.name === 'QwikComponent') return false;