prevent cols/rows from being empty arrays (needed to pass phantom tests)

This commit is contained in:
vieron
2012-07-26 09:58:39 +02:00
parent c6e77dc661
commit 341e1bbd4c

View File

@@ -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);