Skip to content

Commit 8c7a5ed

Browse files
committed
Merge pull request #260 from pixnet/fix-modal-value-undefined
fix(modal): should not get value property when modal is undefined
2 parents 3d04829 + c71f72c commit 8c7a5ed

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/modal/modal.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -258,17 +258,17 @@ angular.module('mm.foundation.modal', ['mm.foundation.transition'])
258258
};
259259

260260
$modalStack.close = function (modalInstance, result) {
261-
var modalWindow = openedWindows.get(modalInstance).value;
261+
var modalWindow = openedWindows.get(modalInstance);
262262
if (modalWindow) {
263-
modalWindow.deferred.resolve(result);
263+
modalWindow.value.deferred.resolve(result);
264264
removeModalWindow(modalInstance);
265265
}
266266
};
267267

268268
$modalStack.dismiss = function (modalInstance, reason) {
269-
var modalWindow = openedWindows.get(modalInstance).value;
269+
var modalWindow = openedWindows.get(modalInstance);
270270
if (modalWindow) {
271-
modalWindow.deferred.reject(reason);
271+
modalWindow.value.deferred.reject(reason);
272272
removeModalWindow(modalInstance);
273273
}
274274
};

0 commit comments

Comments
 (0)