]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: panel/ConfigPanel: return early on no selection
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 26 May 2021 09:01:10 +0000 (11:01 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 27 May 2021 10:43:08 +0000 (12:43 +0200)
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@proxmox.com>
www/manager6/panel/ConfigPanel.js

index d7c363737a8f450e627c39f20fe2abd6e97cdc7e..224bc7682f5df50952c650c3423190d1e47d8419 100644 (file)
@@ -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);