Skip to content

Commit

Permalink
Check that $el is defined for #resizeParent()
Browse files Browse the repository at this point in the history
  • Loading branch information
bj-mcduck committed Aug 30, 2016
1 parent ecebc2f commit 36eedcf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions assets/js/wp-tiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
},

resizeParent: function($el, padding) {
var tiles = $el.children('.wp-tiles-tile'),
tileOffsetTop = parseInt ( $el.offset().top ),
max = 0, newHeight;
var tiles = $el.children('.wp-tiles-tile');
var tileOffsetTop = parseInt( $el.offset().top );
var max = 0;
var newHeight;

// Iterates over every tile to find the bottom. Is there a faster way?
tiles.each(function(){
Expand Down Expand Up @@ -380,4 +381,4 @@
});
}

})(jQuery);
})(jQuery);

0 comments on commit 36eedcf

Please sign in to comment.