From: andrej Date: Wed, 2 Nov 2016 15:37:30 +0000 (+0100) Subject: Equalizer now works for any number of elements. X-Git-Tag: v6.3-rc1~24^2~7^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9323%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Equalizer now works for any number of elements. --- diff --git a/js/foundation.equalizer.js b/js/foundation.equalizer.js index 7c7818e7b..c52187a03 100644 --- a/js/foundation.equalizer.js +++ b/js/foundation.equalizer.js @@ -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; }