From 69e7509006f2f9be06bb4f197ac0c3c0bc8ba980 Mon Sep 17 00:00:00 2001 From: Colin Megill Date: Tue, 20 Apr 2021 00:19:18 -0700 Subject: [PATCH] move var index after returns --- client/src/util/stateManager/colorHelpers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/util/stateManager/colorHelpers.js b/client/src/util/stateManager/colorHelpers.js index f8fc360f..2271ea2d 100644 --- a/client/src/util/stateManager/colorHelpers.js +++ b/client/src/util/stateManager/colorHelpers.js @@ -34,9 +34,10 @@ export function createColorQuery(colorMode, colorByAccessor, schema, genesets) { ]; } case "color by geneset mean expression": { - const varIndex = schema?.annotations?.var?.index; if (!varIndex) return null; + if (!genesets) return null; + const varIndex = schema?.annotations?.var?.index; const _geneset = genesets.get(colorByAccessor); const _setGenes = Array.from(_geneset.genes.keys());