]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fixes #7697, issue where setting closeOnClick: false, would cause an error in the...
authorChris Oyler <chris@zurb.com>
Wed, 6 Jan 2016 19:28:30 +0000 (11:28 -0800)
committerChris Oyler <chris@zurb.com>
Wed, 6 Jan 2016 19:28:30 +0000 (11:28 -0800)
js/foundation.offcanvas.js

index 05846f8446ff872d76e85fd27c741479ef867518..d25adea45c30b3606d30c377d0b3f02c7f0aef1f 100644 (file)
@@ -140,8 +140,7 @@ OffCanvas.prototype._events = function() {
     'keydown.zf.offcanvas': this._handleKeyboard.bind(this)
   });
 
-  if (this.$exiter.length) {
-    var _this = this;
+  if (this.options.closeOnClick && this.$exiter.length) {
     this.$exiter.on({'click.zf.offcanvas': this.close.bind(this)});
   }
 };