From a096dcabfd841ec12a9a260557c17aa73af22ef4 Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Tue, 18 Jul 2017 08:05:48 +0200 Subject: [PATCH] Fix #717: filter invalid colors --- src/js/controller/PalettesListController.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/controller/PalettesListController.js b/src/js/controller/PalettesListController.js index 45eab176..f516b2b2 100644 --- a/src/js/controller/PalettesListController.js +++ b/src/js/controller/PalettesListController.js @@ -54,7 +54,9 @@ var colors = this.getSelectedPaletteColors_(); 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_, { color : color, index : index + 1,