Fix #717: filter invalid colors

This commit is contained in:
Julian Descottes 2017-07-18 08:05:48 +02:00
parent 96d326ef12
commit a096dcabfd

View File

@ -54,7 +54,9 @@
var colors = this.getSelectedPaletteColors_(); var colors = this.getSelectedPaletteColors_();
if (colors.length > 0) { if (colors.length > 0) {
var html = colors.map(function (color, index) { var html = colors.filter(function (color) {
return !!color;
}).map(function (color, index) {
return pskl.utils.Template.replace(this.paletteColorTemplate_, { return pskl.utils.Template.replace(this.paletteColorTemplate_, {
color : color, color : color,
index : index + 1, index : index + 1,