fix: remove node when component unmount

This commit is contained in:
unix
2020-03-25 02:01:41 +08:00
parent ba0975e71d
commit bab279fa29

View File

@@ -25,7 +25,7 @@ const usePortal = (selectId: string = getId()): Element | null => {
return () => {
const node = document.getElementById(id)
if (node) {
// document.body.removeChild(node)
document.body.removeChild(node)
}
}
}, [])