Skip to content

Commit a4ddcc2

Browse files
committed
Update CreateManagedControlPlaneWizardContainer.tsx
1 parent 2ecb4a8 commit a4ddcc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/Wizards/CreateManagedControlPlane/CreateManagedControlPlaneWizardContainer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,10 @@ export const CreateManagedControlPlaneWizardContainer: FC<CreateManagedControlPl
353353
const initialSelection = useMemo(() => {
354354
if (!isEditMode) return undefined;
355355
const selection: Record<string, { isSelected: boolean; version: string }> = {};
356-
const components = initialData?.spec.components;
357-
Object.keys(components ?? {}).forEach((key) => {
356+
const componentsMap = (initialData?.spec.components ?? {}) as Record<string, any>;
357+
Object.keys(componentsMap).forEach((key) => {
358358
if (key === 'apiServer' || key === 'landscaper') return;
359-
const value = components?.[key];
359+
const value = componentsMap[key];
360360
if (key === 'crossplane') {
361361
selection[key] = { isSelected: true, version: value.version ?? '' };
362362
(value.providers ?? []).forEach((prov: { name: string; version: string }) => {

0 commit comments

Comments
 (0)