Skip to content

Commit

Permalink
support document containers in cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
quisido authored May 20, 2024
1 parent c1f2957 commit df68ced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pure.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ function cleanup() {
act(() => {
root.unmount()
})
if (container.parentNode === document.body) {
if (document.body !== null && container.parentNode === document.body) {
document.body.removeChild(container)
}
})
Expand Down

0 comments on commit df68ced

Please sign in to comment.