From: Nicolas Coden Date: Tue, 5 Apr 2016 02:09:44 +0000 (+0200) Subject: Fix setting up of an empty equalized list #8521 X-Git-Tag: v6.2.1~21^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8526%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Fix setting up of an empty equalized list #8521 Fix https://github.com/zurb/foundation-sites/issues/8521 --- diff --git a/js/foundation.equalizer.js b/js/foundation.equalizer.js index 0893c5573..3c51537d3 100644 --- a/js/foundation.equalizer.js +++ b/js/foundation.equalizer.js @@ -155,7 +155,7 @@ class Equalizer { * @returns {Array} groups - An array of heights of children within Equalizer container grouped by row with element,height and max as last child */ getHeightsByRow(cb) { - var lastElTopOffset = this.$watched.first().offset().top, + var lastElTopOffset = (this.$watched.length ? this.$watched.first().offset().top : 0), groups = [], group = 0; //group by Row