From e8f34d1e0491a3b8bdd895c16db0a2119863e5f0 Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Tue, 5 Apr 2016 04:09:44 +0200 Subject: [PATCH] Fix setting up of an empty equalized list #8521 Fix https://github.com/zurb/foundation-sites/issues/8521 --- js/foundation.equalizer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.2