mirror of
https://github.com/bendtherules/react-fiber-traverse.git
synced 2026-08-18 13:52:36 +00:00
Modify utils - doesElementContainRootFiberNode also checks for _internalRoot now
This commit is contained in:
+6
-1
@@ -64,7 +64,12 @@ function isConstructorFunctionComponent(
|
||||
function doesElementContainRootFiberNode(
|
||||
element: Element
|
||||
): element is FiberNodeDOMContainer {
|
||||
return element.hasOwnProperty("_reactRootContainer");
|
||||
return (
|
||||
element.hasOwnProperty("_reactRootContainer") &&
|
||||
(element as (Element & {
|
||||
_reactRootContainer: any;
|
||||
}))._reactRootContainer.hasOwnProperty("_internalRoot")
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user