diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js index 8d2fab8a1..bf6d78973 100644 --- a/src/jquery.gridster.js +++ b/src/jquery.gridster.js @@ -2143,10 +2143,14 @@ var actual_cols = this.$widgets.map(function() { return $(this).attr('data-col'); }); + //needed to pass tests with phantomjs + actual_cols.length || (actual_cols = [0]); var actual_rows = this.$widgets.map(function() { return $(this).attr('data-row'); }); + //needed to pass tests with phantomjs + actual_rows.length || (actual_rows = [0]); var min_cols = Math.max.apply(Math, actual_cols); var min_rows = Math.max.apply(Math, actual_rows);