mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
Fixed a minor issue when trying to destroy a non existing drag_api
This commit is contained in:
Vendored
+5
-4
@@ -3236,11 +3236,12 @@
|
||||
*/
|
||||
fn.destroy = function(){
|
||||
// remove bound callback on window resize
|
||||
$(window).unbind('resize', this.resize_callback);
|
||||
|
||||
// TODO: remove draggable bindings
|
||||
this.drag_api.destroy();
|
||||
$(window).unbind('resize', this.on_window_resize);
|
||||
|
||||
if(this.drag_api){
|
||||
this.drag_api.destroy();
|
||||
}
|
||||
|
||||
// lastly, remove gridster element
|
||||
// this will additionally cause any data associated to this element to be removed, including this
|
||||
// very gridster instance
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+5
-4
@@ -3236,11 +3236,12 @@
|
||||
*/
|
||||
fn.destroy = function(){
|
||||
// remove bound callback on window resize
|
||||
$(window).unbind('resize', this.resize_callback);
|
||||
|
||||
// TODO: remove draggable bindings
|
||||
this.drag_api.destroy();
|
||||
$(window).unbind('resize', this.on_window_resize);
|
||||
|
||||
if(this.drag_api){
|
||||
this.drag_api.destroy();
|
||||
}
|
||||
|
||||
// lastly, remove gridster element
|
||||
// this will additionally cause any data associated to this element to be removed, including this
|
||||
// very gridster instance
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -2531,9 +2531,10 @@
|
||||
// remove bound callback on window resize
|
||||
$(window).unbind('resize', this.on_window_resize);
|
||||
|
||||
// TODO: remove draggable bindings
|
||||
this.drag_api.destroy();
|
||||
|
||||
if(this.drag_api){
|
||||
this.drag_api.destroy();
|
||||
}
|
||||
|
||||
// lastly, remove gridster element
|
||||
// this will additionally cause any data associated to this element to be removed, including this
|
||||
// very gridster instance
|
||||
|
||||
Reference in New Issue
Block a user