diff --git a/src/components/base/notification/index.js b/src/components/base/notification/index.js index 4c1fe2124..d088e6649 100644 --- a/src/components/base/notification/index.js +++ b/src/components/base/notification/index.js @@ -35,7 +35,10 @@ Notification.newInstance = properties => { destroy (element) { notification.closeAll(); isClient && setTimeout(function() { - document.body.removeChild(document.getElementsByClassName(element)[0]); + const removeElement = document.querySelectorAll(`.${element}`)[0]; + if (container && removeElement) { + container.removeChild(removeElement); + } }, 500); } };