diff --git a/src/cbWeb/js/cellBrowser.js b/src/cbWeb/js/cellBrowser.js index 50b2c996..957fc73d 100644 --- a/src/cbWeb/js/cellBrowser.js +++ b/src/cbWeb/js/cellBrowser.js @@ -1272,9 +1272,8 @@ var tsnePlot = function() { var rows = legend.rows; var n = rows.length; var pal = null; - if (metaFieldIndex!==undefined) { - var predefColors = db.conf.metaFields[metaFieldIndex].colors; - if (predefColors!==undefined) + var predefColors = db.conf.metaFields[metaFieldIndex].colors; + if (metaFieldIndex!==undefined && predefColors!==undefined) { pal = predefColors; } else { pal = makeColorPalette(palName, n);