diff --git a/msgbox/msgbox.js b/msgbox/msgbox.js index f545e26a..4e418832 100644 --- a/msgbox/msgbox.js +++ b/msgbox/msgbox.js @@ -43,12 +43,10 @@ function messageBox({ } function resolveWith(value) { - if (messageBox.resolve) { - unbindGlobalListeners(); - setTimeout(messageBox.resolve, 0, value); - animateElement(messageBox.element, {className: 'fadeout', remove: true}) - .then(removeSelf); - } + unbindGlobalListeners(); + setTimeout(messageBox.resolve, 0, value); + animateElement(messageBox.element, {className: 'fadeout', remove: true}) + .then(removeSelf); } function createElement() {