]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fixes an issue where if deeplinking was NOT enabled, the plugin would error on .destroy()
authorzurbchris <chris@zurb.com>
Wed, 25 Nov 2015 00:36:33 +0000 (16:36 -0800)
committerzurbchris <chris@zurb.com>
Wed, 25 Nov 2015 00:36:33 +0000 (16:36 -0800)
js/foundation.magellan.js

index abcac73876e653a6abcbd04e140ddf1dea0e7f74..b97091d979a0a42632d808edb0f0fa5167c55285 100644 (file)
     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);
   };