Skip to content

Commit

Permalink
use def colors for empty colorInfo list
Browse files Browse the repository at this point in the history
  • Loading branch information
eimrek committed Apr 10, 2024
1 parent 5374b71 commit 9f3ddf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/jqueryBands/bandstructure.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 9f3ddf7

Please sign in to comment.