Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5fd2d54

Browse files
committedDec 7, 2024·
support document containers in cleanup
1 parent 85ac253 commit 5fd2d54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/pure.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ function cleanup() {
263263
act(() => {
264264
root.unmount()
265265
})
266-
if (container.parentNode === document.body) {
266+
if (document.body !== null && container.parentNode === document.body) {
267267
document.body.removeChild(container)
268268
}
269269
})

0 commit comments

Comments
 (0)
Please sign in to comment.