Modify util.isConstructorHtmlLike - Allow null typeas input

This commit is contained in:
2019-08-10 10:46:42 +05:30
parent 887f4b95d1
commit e64d51a3e6
+1 -1
View File
@@ -30,7 +30,7 @@ function isNodeComponentClass(
} }
function isConstructorHtmlLike( function isConstructorHtmlLike(
ctr: React.ElementType ctr: React.ElementType | null
): ctr is Exclude<React.ElementType, React.ComponentType> { ): ctr is Exclude<React.ElementType, React.ComponentType> {
if (typeof ctr === "string" || ctr === null) { if (typeof ctr === "string" || ctr === null) {
return true; return true;