Skip to content

Commit

Permalink
Merge pull request #1350 from yaacov/check-for-array-before-assuming-…
Browse files Browse the repository at this point in the history
…it-can-reduce-2.7.2

[v2.7.2] Don't assume the resources are array
  • Loading branch information
yaacov authored Oct 8, 2024
2 parents d75b3db + 7ba9fa2 commit 8fdec4f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(resources: T[]): { [key: string]: T } {
if (!resources) {
if (!resources || !Array.isArray(resources)) {
return undefined;
}

Expand Down

0 comments on commit 8fdec4f

Please sign in to comment.