From 9b49d4935230f731c78ecaac53bcd34f52a3588b Mon Sep 17 00:00:00 2001 From: Euan Goddard Date: Mon, 24 Jun 2019 08:46:14 +0100 Subject: [PATCH] Used module level variable for observer Post-review changes --- src/definitions/modules/modal.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index cb125349c..915b2c29d 100755 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -138,7 +138,7 @@ $.fn.modal = function(parameters) { }, destroy: function() { - if (module.observer) { + if (observer) { observer.disconnect(); } module.verbose('Destroying previous modal'); @@ -163,7 +163,6 @@ $.fn.modal = function(parameters) { subtree : true }); module.debug('Setting up mutation observer', observer); - module.observer = observer; } },