]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Equalizer now works for any number of elements. 9323/head
authorandrej <andrej.borstnik@matheo.si>
Wed, 2 Nov 2016 15:37:30 +0000 (16:37 +0100)
committerandrej <andrej.borstnik@matheo.si>
Wed, 2 Nov 2016 15:37:30 +0000 (16:37 +0100)
js/foundation.equalizer.js

index 7c7818e7b1cd44021a60099b025a30bbbb4ab0bc..c52187a03f08862c43254fce5a08cfba7ce7d3a7 100644 (file)
@@ -158,6 +158,9 @@ class Equalizer {
    * @private
    */
   _isStacked() {
+    if (!this.$watched[0] || !this.$watched[1]) {
+      return true;
+    }
     return this.$watched[0].getBoundingClientRect().top !== this.$watched[1].getBoundingClientRect().top;
   }