fix(react-simulator-renderer): detached node has children

detached node has children will return false, causing memory leaks.
This commit is contained in:
ZeralZhang 2024-01-26 09:38:37 +08:00
parent b3880e9a96
commit b29c53901e
1 changed files with 1 additions and 1 deletions

View File

@ -614,7 +614,7 @@ function getNodeInstance(fiberNode: any, specId?: string): IPublicTypeNodeInstan
function checkInstanceMounted(instance: any): boolean {
if (isElement(instance)) {
return instance.parentElement != null;
return instance.parentElement != null && window.document.contains(instance);
}
return true;
}