diff --git a/server/routes/termdb.violin.ts b/server/routes/termdb.violin.ts index b9ad225d90..5e25e39516 100644 --- a/server/routes/termdb.violin.ts +++ b/server/routes/termdb.violin.ts @@ -63,7 +63,7 @@ export async function trigger_getViolinPlotData( const sampleType = `All ${data.sampleType?.plural_name || 'samples'}` if (data.error) throw data.error //get ordered labels to sort keys in key2values - if (q.divideTw.$id && data.refs.byTermId[q.divideTw.$id]) { + if (q.divideTw && data.refs.byTermId[q.divideTw.$id]) { data.refs.byTermId[q.divideTw.$id].orderedLabels = getOrderedLabels( q.divideTw, data.refs.byTermId[q.divideTw.$id]?.bins,