]> git.proxmox.com Git - proxmox-backup.git/commitdiff
fix #5117: ui: node info: avoid invalid array access for certain foreign kernels
authorFiona Ebner <f.ebner@proxmox.com>
Thu, 14 Dec 2023 10:40:24 +0000 (11:40 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 14 Dec 2023 12:52:07 +0000 (13:52 +0100)
with custom build date format, which would prevent the panel from loading.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
www/panel/NodeInfo.js

index 72f97c7cc1f3efb36c1c3c52d19e5148443fe1d3..454986ef19aa41b08fdd005c10a748e8d11a6c64 100644 (file)
@@ -151,7 +151,7 @@ Ext.define('PBS.NodeInfoPanel', {
                    return data.kversion;
                }
                let kernel = data['current-kernel'];
-               let buildDate = kernel.version.match(/\((.+)\)\s*$/)[1] ?? 'unknown';
+               let buildDate = kernel.version.match(/\((.+)\)\s*$/)?.[1] ?? 'unknown';
                return `${kernel.sysname} ${kernel.release} (${buildDate})`;
            },
            value: '',