diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/utils/hooks/useVSphereInventoryVms.tsx b/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/utils/hooks/useVSphereInventoryVms.tsx index b1acfa0e9..627adac80 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/utils/hooks/useVSphereInventoryVms.tsx +++ b/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/utils/hooks/useVSphereInventoryVms.tsx @@ -47,7 +47,7 @@ export const useVSphereInventoryVms = ( * @returns {{ [key: string]: T }} - A dictionary with resource IDs as keys and Resource objects as values. */ function convertArrayToDictionary(resources: T[]): { [key: string]: T } { - if (!resources) { + if (!resources || !Array.isArray(resources)) { return undefined; }