mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
prevent cols/rows from being empty arrays (needed to pass phantom tests)
This commit is contained in:
@@ -2143,10 +2143,14 @@
|
|||||||
var actual_cols = this.$widgets.map(function() {
|
var actual_cols = this.$widgets.map(function() {
|
||||||
return $(this).attr('data-col');
|
return $(this).attr('data-col');
|
||||||
});
|
});
|
||||||
|
//needed to pass tests with phantomjs
|
||||||
|
actual_cols.length || (actual_cols = [0]);
|
||||||
|
|
||||||
var actual_rows = this.$widgets.map(function() {
|
var actual_rows = this.$widgets.map(function() {
|
||||||
return $(this).attr('data-row');
|
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_cols = Math.max.apply(Math, actual_cols);
|
||||||
var min_rows = Math.max.apply(Math, actual_rows);
|
var min_rows = Math.max.apply(Math, actual_rows);
|
||||||
|
Reference in New Issue
Block a user