mirror of
https://github.com/bendtherules/react-fiber-traverse.git
synced 2026-08-18 13:52:36 +00:00
Modify isConstructorFunctionComponent - Check type is function
This commit is contained in:
+1
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user