From 4019a603f4f19e4d0aeecffb0fc2f452f1aaf878 Mon Sep 17 00:00:00 2001 From: Matias Lescano Date: Wed, 25 Sep 2013 14:29:07 -0300 Subject: [PATCH] $.magnificPopup.close() shouldn't throw an exception if theres no instance --- src/js/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/core.js b/src/js/core.js index 889af474..7ac3732c 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -830,7 +830,7 @@ $.magnificPopup = { }, close: function() { - return $.magnificPopup.instance.close(); + return $.magnificPopup.instance && $.magnificPopup.instance.close(); }, registerModule: function(name, module) {