mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
Fix undefined exception in update_widgets_dimensions
This commit is contained in:
Vendored
+3
@@ -2184,6 +2184,9 @@
|
||||
fn.update_widgets_dimensions = function () {
|
||||
$.each(this.$widgets, $.proxy(function (idx, widget) {
|
||||
var wgd = $(widget).coords().grid;
|
||||
if (typeof (wgd) !== 'object') {
|
||||
return;
|
||||
}
|
||||
var width = (wgd.size_x * (this.is_responsive() ? this.get_responsive_col_width() : this.options.widget_base_dimensions[0]) +
|
||||
((wgd.size_x - 1) * this.options.widget_margins[0]));
|
||||
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+3
@@ -2184,6 +2184,9 @@
|
||||
fn.update_widgets_dimensions = function () {
|
||||
$.each(this.$widgets, $.proxy(function (idx, widget) {
|
||||
var wgd = $(widget).coords().grid;
|
||||
if (typeof (wgd) !== 'object') {
|
||||
return;
|
||||
}
|
||||
var width = (wgd.size_x * (this.is_responsive() ? this.get_responsive_col_width() : this.options.widget_base_dimensions[0]) +
|
||||
((wgd.size_x - 1) * this.options.widget_margins[0]));
|
||||
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
@@ -1290,6 +1290,9 @@
|
||||
fn.update_widgets_dimensions = function () {
|
||||
$.each(this.$widgets, $.proxy(function (idx, widget) {
|
||||
var wgd = $(widget).coords().grid;
|
||||
if (typeof (wgd) !== 'object') {
|
||||
return;
|
||||
}
|
||||
var width = (wgd.size_x * (this.is_responsive() ? this.get_responsive_col_width() : this.options.widget_base_dimensions[0]) +
|
||||
((wgd.size_x - 1) * this.options.widget_margins[0]));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user