From: Marius Olbertz Date: Wed, 28 Sep 2016 19:08:59 +0000 (+0200) Subject: Removed unused variable and check if target is active before executing up(). X-Git-Tag: v6.2.4-rc1~26^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=109d32c27e2ceef698276f3487996c83fd611af2;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Removed unused variable and check if target is active before executing up(). --- diff --git a/js/foundation.accordion.js b/js/foundation.accordion.js index b5f144c9c..9809cc4be 100644 --- a/js/foundation.accordion.js +++ b/js/foundation.accordion.js @@ -162,9 +162,8 @@ class Accordion { up($target) { var $aunts = $target.parent().siblings(), _this = this; - var canClose = $aunts.hasClass('is-active'); - if(!this.options.allowAllClosed && !$aunts.hasClass('is-active')) { + if((!this.options.allowAllClosed && !$aunts.hasClass('is-active')) || !$target.parent().hasClass('is-active')) { return; }