Closing dialog throws error about Promises

This commit is contained in:
Leonardo Campos 2017-03-04 01:33:51 -03:00
parent 3ad813be9e
commit 5785607298

View File

@ -51,7 +51,7 @@ OHIF.ui.showDialog = (templateName, dialogData) => {
// Destroy the created dialog view when the promise is either resolved or rejected
const dismissModal = () => {
if (dialogData.promise && $modal) {
if (dialogData && dialogData.promise && $modal) {
$modal.one('hidden.bs.modal', () => Blaze.remove(view)).modal('hide');
} else {
Blaze.remove(view);