Skip to content

Commit

Permalink
fix: Added null checks for failing value (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslf97 authored Oct 11, 2024
1 parent 08d3396 commit 1f0e04e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const VariogramResultTable = ({
const resultElementsList: ResultObjectType[] = resultList.map((e) => {
const method = caseList.data?.data.filter(
(c) => c.computeCaseId === e.computeCaseId,
)[0].computeMethod.name;
)[0]?.computeMethod?.name;
let parameter = '';
if (method === 'Indicator') {
parameter = e.indicator ? e.indicator : '';
Expand All @@ -51,7 +51,7 @@ export const VariogramResultTable = ({

const modelArea = caseList.data?.data.filter(
(c) => c.computeCaseId === e.computeCaseId,
)[0].modelArea;
)[0]?.modelArea;

const element: ResultObjectType = {
variogramResultId: e.variogramResultId,
Expand All @@ -71,7 +71,7 @@ export const VariogramResultTable = ({
const handleImageDialog = (id: string, variogramResultId: string) => {
const computeCaseResults = resultList.filter((e) => e.computeCaseId === id);
const resultFile = computeCaseResults
.find((r) => r.variogramResultId == variogramResultId)!
.find((r) => r.variogramResultId === variogramResultId)!
.variogramResultFiles.find((x) =>
x.fileName.includes('variogram_slices_'),
);
Expand Down

0 comments on commit 1f0e04e

Please sign in to comment.