Skip to content

Commit 6cb2087

Browse files
committed
support document containers in cleanup
1 parent 65bc994 commit 6cb2087

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
@@ -281,7 +281,7 @@ function cleanup() {
281281
act(() => {
282282
root.unmount()
283283
})
284-
if (container.parentNode === document.body) {
284+
if (document.body !== null && container.parentNode === document.body) {
285285
document.body.removeChild(container)
286286
}
287287
})

0 commit comments

Comments
 (0)