From 63381b350fdfd13acc3046e1fb387051ea96adbb Mon Sep 17 00:00:00 2001 From: Francesco Torchia Date: Mon, 9 Sep 2024 12:03:19 +0200 Subject: [PATCH] Add missing empty devices check Signed-off-by: Francesco Torchia --- .../VirtualMachinePciDevices/index.vue | 2 +- .../VirtualMachineUSBDevices/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/index.vue b/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/index.vue index 4e89ceeb..05ee97d4 100644 --- a/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/index.vue +++ b/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/index.vue @@ -100,7 +100,7 @@ export default { }); const devices = [ - ...this.otherDevices(this.value.domain.devices.hostDevices), + ...this.otherDevices(this.value.domain.devices.hostDevices || []), ...formatted, ]; diff --git a/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineUSBDevices/index.vue b/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineUSBDevices/index.vue index 8e27fe6d..e8148132 100644 --- a/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineUSBDevices/index.vue +++ b/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachineUSBDevices/index.vue @@ -80,7 +80,7 @@ export default { }); const devices = [ - ...this.otherDevices(this.value.domain.devices.hostDevices), + ...this.otherDevices(this.value.domain.devices.hostDevices || []), ...formatted, ];