Skip to content

Commit

Permalink
🪲 Add a check for undefined, in case of invalid cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasGilg committed Nov 9, 2023
1 parent eed53b2 commit bc9dacb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/Scenario/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function useGetSimulationStartValues() {
);

useEffect(() => {
if (caseData) {
if (caseData?.results && caseData.results.length > 0) {
setCompartmentValues(caseData.results[0].compartments);
}
}, [caseData]);
Expand Down

0 comments on commit bc9dacb

Please sign in to comment.