From 48129c7bed0fea5c84f31212fa4530449389997b Mon Sep 17 00:00:00 2001 From: Aaron Lauterer Date: Tue, 22 Jun 2021 10:07:26 +0200 Subject: [PATCH] ui: dc: backup: fix job detail search 'for...in array' returns the id in the array but not the value, 'for...of array' returns the values. Another issue that I ran into was if the property did not exist. Checking if the property evaluates to false will catch situations where the property does not exist or is null. All other situations where there is a value for the name, id or type, should evaluate to true if present as they are strings or the VMID. Signed-off-by: Aaron Lauterer --- www/manager6/dc/Backup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js index 99401154..6be545ee 100644 --- a/www/manager6/dc/Backup.js +++ b/www/manager6/dc/Backup.js @@ -515,8 +515,8 @@ Ext.define('PVE.dc.BackupDiskTree', { data = record.parentNode.data; } - for (const property in ['name', 'id', 'type']) { - if (data[property] === null) { + for (const property of ['name', 'id', 'type']) { + if (!data[property]) { continue; } let v = data[property].toString(); -- 2.39.2