diff --git a/src/features/Results/CaseResult/CaseResultView/CaseResultView.tsx b/src/features/Results/CaseResult/CaseResultView/CaseResultView.tsx index c5bb7762..e00d46e6 100644 --- a/src/features/Results/CaseResult/CaseResultView/CaseResultView.tsx +++ b/src/features/Results/CaseResult/CaseResultView/CaseResultView.tsx @@ -27,10 +27,11 @@ export const CaseResultView = ({ key={obj.computeCaseId} data={obj} computeCase={ - computeCases && - computeCases.filter( - (c) => c.computeCaseId === obj.computeCaseId, - ) + computeCases && computeCases.length > 0 + ? computeCases.filter( + (c) => c.computeCaseId === obj.computeCaseId, + ) + : [] } > ))} diff --git a/src/features/Results/CaseResult/CaseResultView/ObjectCaseResult/ChannelResultTable.tsx b/src/features/Results/CaseResult/CaseResultView/ObjectCaseResult/ChannelResultTable.tsx index 31893e35..2da5bfc3 100644 --- a/src/features/Results/CaseResult/CaseResultView/ObjectCaseResult/ChannelResultTable.tsx +++ b/src/features/Results/CaseResult/CaseResultView/ObjectCaseResult/ChannelResultTable.tsx @@ -17,7 +17,12 @@ export const ChannelResultTable = ({ }; let modelArea = ''; - if (computeCase && computeCase[0].modelArea !== null) + if ( + computeCase && + computeCase[0] && + computeCase[0].modelArea !== undefined && + computeCase[0].modelArea !== null + ) modelArea = computeCase && computeCase[0].modelArea.name; if (modelArea === '') modelArea = 'Whole model';