mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 03:01:16 +00:00
fix(react-simulator-renderer): detached node has children
detached node has children will return false, causing memory leaks.
This commit is contained in:
parent
b3880e9a96
commit
b29c53901e
@ -614,7 +614,7 @@ function getNodeInstance(fiberNode: any, specId?: string): IPublicTypeNodeInstan
|
|||||||
|
|
||||||
function checkInstanceMounted(instance: any): boolean {
|
function checkInstanceMounted(instance: any): boolean {
|
||||||
if (isElement(instance)) {
|
if (isElement(instance)) {
|
||||||
return instance.parentElement != null;
|
return instance.parentElement != null && window.document.contains(instance);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user