]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix issue #4930, by only calling offset() after checking vals.length 5044/head
authorJoe di Stefano <joeydi@okaypl.us>
Tue, 22 Apr 2014 17:58:34 +0000 (13:58 -0400)
committerJoe di Stefano <joeydi@okaypl.us>
Tue, 22 Apr 2014 17:58:37 +0000 (13:58 -0400)
js/foundation/foundation.equalizer.js

index 3ad4f2dafc07897dbf3c2e74c23c850531ab9d6f..403b2fd43ad86fcf2fbaca264749b9705c9c0523 100644 (file)
     equalize: function(equalizer) {
       var isStacked = false,
           vals = equalizer.find('[' + this.attr_name() + '-watch]:visible'),
-          firstTopOffset = vals.first().offset().top,
           settings = equalizer.data(this.attr_name(true)+'-init');
 
       if (vals.length === 0) return;
+      var firstTopOffset = vals.first().offset().top;
       settings.before_height_change();
       equalizer.trigger('before-height-change');
       vals.height('inherit');