diff --git a/src/utils.ts b/src/utils.ts index 9a80224..73d92e4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -58,7 +58,7 @@ function isConstructorComponentClass( function isConstructorFunctionComponent( ctr: React.ElementType | null ): ctr is React.FunctionComponent { - return !isConstructorComponentClass(ctr); + return typeof ctr === "function" && !isConstructorComponentClass(ctr); } function doesElementContainRootFiberNode(