From dc1f0cb56e051cc2bfca61bcdb31c472bfc22a89 Mon Sep 17 00:00:00 2001 From: James Hadfield Date: Thu, 1 Feb 2018 13:20:08 -0800 Subject: [PATCH] improve error message --- src/reducers/controls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reducers/controls.js b/src/reducers/controls.js index b15d27dd1..edfd2ff9f 100644 --- a/src/reducers/controls.js +++ b/src/reducers/controls.js @@ -215,9 +215,9 @@ const checkAndCorrectErrorsInState = (state, metadata) => { if (availableNonGenotypeColorBys.indexOf("gt") > -1) { availableNonGenotypeColorBys.splice(availableNonGenotypeColorBys.indexOf("gt"), 1); } + console.error("Error detected trying to set colorBy to", state.colorBy, "(valid options are", Object.keys(metadata.color_options).join(", "), "). Setting to", availableNonGenotypeColorBys[0]); state.colorBy = availableNonGenotypeColorBys[0]; state.defaults.colorBy = availableNonGenotypeColorBys[0]; - console.error("Error detected. Setting colorBy to ", state.colorBy); } /* colorBy confidence */