fix #5121: ui: node status: avoid invalid array access for certain foreign kernels

with custom build date format, which would prevent the panel from loading.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2023-12-14 11:34:44 +01:00 committed by Thomas Lamprecht
parent 4f0d58394f
commit 4fb7e9e434

View File

@ -109,7 +109,7 @@ Ext.define('PVE.node.StatusView', {
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: '',