From 9f3ddf70b1403dc6178cf538d16569e343f44510 Mon Sep 17 00:00:00 2001 From: Kristjan Eimre Date: Wed, 10 Apr 2024 16:54:59 +0300 Subject: [PATCH] use def colors for empty colorInfo list --- src/lib/jqueryBands/bandstructure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/jqueryBands/bandstructure.js b/src/lib/jqueryBands/bandstructure.js index e75c81e..4ef1a27 100644 --- a/src/lib/jqueryBands/bandstructure.js +++ b/src/lib/jqueryBands/bandstructure.js @@ -181,7 +181,7 @@ BandPlot.prototype.addBandStructure = function (bandsData, colorInfo) { "#ff7f00", ]; - if (typeof colorInfo === "undefined") { + if (!colorInfo || colorInfo.length) { var nextIndex = this.allColorInfo.length; var newColor = tinycolor(defaultColors[nextIndex % defaultColors.length]); colorInfo = [