From e80139264b67a57ca734c4a0961e92661a761baa Mon Sep 17 00:00:00 2001 From: zurbchris Date: Tue, 24 Nov 2015 16:36:33 -0800 Subject: [PATCH] fixes an issue where if deeplinking was NOT enabled, the plugin would error on .destroy() --- js/foundation.magellan.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/foundation.magellan.js b/js/foundation.magellan.js index abcac7387..b97091d97 100644 --- a/js/foundation.magellan.js +++ b/js/foundation.magellan.js @@ -186,9 +186,10 @@ this.$element.off('.zf.trigger .zf.magellan') .find('.' + this.options.activeClass).removeClass(this.options.activeClass); - var hash = this.$active[0].getAttribute('href'); - - window.location.hash.replace(hash, ''); + if(this.options.deepLinking){ + var hash = this.$active[0].getAttribute('href'); + window.location.hash.replace(hash, ''); + } Foundation.unregisterPlugin(this); }; -- 2.47.2