From 290b31c33e2de1aa085a221df6238c3d66ab27a3 Mon Sep 17 00:00:00 2001 From: felmer <franz-josef.elmer@id.ethz.ch> Date: Mon, 23 Aug 2021 07:36:45 +0200 Subject: [PATCH] SSDM-11577: Bug in SideMenuWidgetController.deleteNodeByEntityPermId fixed: handle undefined node --- .../js/views/SideMenu/SideMenuWidgetController.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetController.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetController.js index 327b665b583..a28fd72a8df 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetController.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetController.js @@ -1,4 +1,4 @@ -/* + /* * Copyright 2014 ETH Zuerich, Scientific IT Services * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -39,11 +39,13 @@ function SideMenuWidgetController(mainController) { this.deleteNodeByEntityPermId = function(key, isMoveToParent) { var node = $(this._sideMenuWidgetModel.tree).fancytree('getTree').getNodeByKey(key); - if(isMoveToParent) { - var parent = node.getParent(); - this._showNodeView(parent); - } - node.remove(); + if (node) { + if(isMoveToParent) { + var parent = node.getParent(); + this._showNodeView(parent); + } + node.remove(); + } }; this.refreshCurrentNode = function() { -- GitLab