[SSE] Fix scale settings

This commit is contained in:
Julia Radzhabova 2021-02-02 15:38:59 +03:00
parent a9f022503d
commit 335a21c843

View file

@ -1580,7 +1580,7 @@ define([
if (this.scaleProps ) {
var colors = this.scaleProps.asc_getColors();
colors[picker.options.type] = Common.Utils.ThemeColor.getRgbColor(picker.currentColor);
colors[Math.min(picker.options.type, colors.length-1)] = Common.Utils.ThemeColor.getRgbColor(picker.currentColor);
this.scaleProps.asc_setColors(colors);
this.previewFormat();
}