diff --git a/src/utils/components/PodSelectorModal/selectorUtils.ts b/src/utils/components/PodSelectorModal/selectorUtils.ts index d37c5c1e..dbfc1678 100644 --- a/src/utils/components/PodSelectorModal/selectorUtils.ts +++ b/src/utils/components/PodSelectorModal/selectorUtils.ts @@ -6,8 +6,8 @@ import { selectorToString } from '../Selector/utilts'; import { requirementFromString } from './selectorRequirements'; import { FromRequirementsOptions, Requirement } from './types'; -export const arrayify = (obj: any): string[] => - Object.entries(obj).map(([key, value]) => (value ? `${key}=${value}` : key)); +export const arrayify = (obj?: null | Record): string[] => + Object.entries(obj ?? {}).map(([key, value]) => (value ? `${key}=${value}` : key)); export const objectify = (arr: string[]): Record => arr.reduce((acc, item) => {