diff --git a/packages/dina-ui/components/molecular-analysis/useMolecularAnalysisRun.tsx b/packages/dina-ui/components/molecular-analysis/useMolecularAnalysisRun.tsx index 619cb21db..c750963de 100644 --- a/packages/dina-ui/components/molecular-analysis/useMolecularAnalysisRun.tsx +++ b/packages/dina-ui/components/molecular-analysis/useMolecularAnalysisRun.tsx @@ -726,10 +726,15 @@ export function useMolecularAnalysisRunView({ } return metagenomicsBatchItems; } - const usageType = molecularAnalysisRunItems.filter( (runItem) => runItem.usageType !== "quality-control" - )?.[0].usageType; + )?.[0]?.usageType; + + if (!usageType) { + setLoading(false); + return; + } + setColumns( getMolecularAnalysisRunColumns( compareByStringAndNumber,