Skip to content

Commit

Permalink
fix: modules view when modules are not presented in Kyma CR
Browse files Browse the repository at this point in the history
  • Loading branch information
mrCherry97 committed Jul 11, 2024
1 parent f9609e7 commit ea46483
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/KymaModules/KymaModulesAddModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default function KymaModulesAddModule(props) {
};

const findStatus = moduleName => {
return kymaResource?.status.modules?.find(
return kymaResource?.status?.modules?.find(
module => moduleName === module.name,
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/KymaModules/KymaModulesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export function KymaModulesList(props) {
};
};

const [selectedModules] = useState(kymaResource?.spec?.modules);
const [selectedModules] = useState(kymaResource?.spec?.modules || []);
const [initialUnchangedResource] = useState(cloneDeep(kymaResource));
const [kymaResourceState, setKymaResourceState] = useState(kymaResource);
const notification = useNotification();
Expand Down

0 comments on commit ea46483

Please sign in to comment.