Skip to content

Commit b29c539

Browse files
committed
fix(react-simulator-renderer): detached node has children
detached node has children will return false, causing memory leaks.
1 parent b3880e9 commit b29c539

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-simulator-renderer/src/renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ function getNodeInstance(fiberNode: any, specId?: string): IPublicTypeNodeInstan
614614

615615
function checkInstanceMounted(instance: any): boolean {
616616
if (isElement(instance)) {
617-
return instance.parentElement != null;
617+
return instance.parentElement != null && window.document.contains(instance);
618618
}
619619
return true;
620620
}

0 commit comments

Comments
 (0)