diff --git a/src/index.js b/src/index.js index 003f6cf..c78f1cd 100644 --- a/src/index.js +++ b/src/index.js @@ -187,18 +187,17 @@ class Toast { this.onAnimationEnd(() => { this.removeParent(this.element.parentNode) this.element.remove() - delete containers.position }) } else { this.removeParent(this.element.parentNode) this.element.remove() - delete containers.position } } removeParent(element) { if (element && element.children.length <= 1) { element.remove() + delete containers.position } }