[pve-devel] [PATCH manager 4/6] ui: panel/ConfigPanel: return early on no selection

Dominik Csapak d.csapak at proxmox.com
Wed May 26 11:01:10 CEST 2021


treelist technically allows deselection and this happens on destruction
in extjs 7.0 so simply return early to avoid errors accessing
components that do not exist anymore

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/panel/ConfigPanel.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/www/manager6/panel/ConfigPanel.js b/www/manager6/panel/ConfigPanel.js
index d7c36373..224bc768 100644
--- a/www/manager6/panel/ConfigPanel.js
+++ b/www/manager6/panel/ConfigPanel.js
@@ -68,6 +68,9 @@ Ext.define('PVE.panel.Config', {
 	    singleExpand: false,
 	    listeners: {
 		selectionchange: function(treeList, selection) {
+		    if (!selection) {
+			return;
+		    }
 		    let view = this.up('panel');
 		    view.suspendLayout = true;
 		    view.activateCard(selection.data.id);
-- 
2.20.1






More information about the pve-devel mailing list