]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Removed unused variable and check if target is active before executing up().
authorMarius Olbertz <marius.olbertz@gmail.com>
Wed, 28 Sep 2016 19:08:59 +0000 (21:08 +0200)
committerMarius Olbertz <marius.olbertz@gmail.com>
Wed, 28 Sep 2016 19:08:59 +0000 (21:08 +0200)
js/foundation.accordion.js

index b5f144c9c67b0f64f3e1ee7a5a7a8842c4e581dd..9809cc4be3a01474b2aedd52bbf5aa65e9ddfd48 100644 (file)
@@ -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;
     }