Prevent JS error after closing help-popup

This commit is contained in:
Rob Garrison 2017-08-25 15:50:05 -05:00
parent 0cd88873e1
commit f9c035082f

View File

@ -43,10 +43,12 @@ function messageBox({
}
function resolveWith(value) {
unbindGlobalListeners();
setTimeout(messageBox.resolve, 0, value);
animateElement(messageBox.element, {className: 'fadeout', remove: true})
.then(removeSelf);
if (messageBox.resolve) {
unbindGlobalListeners();
setTimeout(messageBox.resolve, 0, value);
animateElement(messageBox.element, {className: 'fadeout', remove: true})
.then(removeSelf);
}
}
function createElement() {