mirror of
https://github.com/bendtherules/react-fiber-traverse.git
synced 2026-08-18 22:01:49 +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(
|
function doesElementContainRootFiberNode(
|
||||||
element: Element
|
element: Element
|
||||||
): element is FiberNodeDOMContainer {
|
): 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