diff --git a/frontend-v2/src/features/results/useParameters.tsx b/frontend-v2/src/features/results/useParameters.tsx index 5b2ca9fb..1de725c3 100644 --- a/frontend-v2/src/features/results/useParameters.tsx +++ b/frontend-v2/src/features/results/useParameters.tsx @@ -105,7 +105,7 @@ export function useParameters() { const [baseIntervals] = useModelTimeIntervals(); const baseVariables = useVariables(); const intervals = useNormalisedIntervals(baseIntervals); - const variables = useNormalisedVariables(baseVariables || []); + const variables = useNormalisedVariables(baseVariables); return [ { name: "Min", diff --git a/frontend-v2/src/features/results/useUnits.ts b/frontend-v2/src/features/results/useUnits.ts index f1981499..96e9460d 100644 --- a/frontend-v2/src/features/results/useUnits.ts +++ b/frontend-v2/src/features/results/useUnits.ts @@ -19,5 +19,5 @@ export function useUnits() { { compoundId: project?.compound }, { skip: !project || !project.compound }, ); - return units; + return units || []; } diff --git a/frontend-v2/src/features/results/useVariables.ts b/frontend-v2/src/features/results/useVariables.ts index 35aa98b8..c92ffdce 100644 --- a/frontend-v2/src/features/results/useVariables.ts +++ b/frontend-v2/src/features/results/useVariables.ts @@ -20,5 +20,5 @@ export function useVariables() { { dosedPkModelId: model?.id || 0 }, { skip: !model?.id }, ); - return variables; + return variables || []; }