diff --git a/src/pages/experiments/[experimentId]/plots-and-tables/dot-plot/index.jsx b/src/pages/experiments/[experimentId]/plots-and-tables/dot-plot/index.jsx index ea3fe6f0df..4e05e1a2aa 100644 --- a/src/pages/experiments/[experimentId]/plots-and-tables/dot-plot/index.jsx +++ b/src/pages/experiments/[experimentId]/plots-and-tables/dot-plot/index.jsx @@ -176,6 +176,8 @@ const DotPlotPage = (props) => { }; const reorderData = (order) => { + if (!plotData) return; + const cellSetsNames = [...new Set(plotData.map((elem) => elem.cellSets))]; const reorderedData = []; cellSetsNames.forEach((set) => { @@ -190,6 +192,8 @@ const DotPlotPage = (props) => { }; const deleteData = (genes) => { + if (!plotData) return; + const data = plotData.filter((elem) => !genes.includes(elem.geneName)); dispatch(updatePlotData(plotUuid, data)); }; @@ -291,7 +295,7 @@ const DotPlotPage = (props) => { // load initial state, based on highest dispersion genes from all genes useEffect(() => { - if (_.isEmpty(geneData) || !config || plotData?.length) { + if (_.isEmpty(geneData) || !config || plotDataLoading) { return; } loadHighestDispersionGenes();