diff --git a/src/Tinter.js b/src/Tinter.js index 4ab48dda38..916c8b18d8 100644 --- a/src/Tinter.js +++ b/src/Tinter.js @@ -19,6 +19,10 @@ const DEBUG = 0; // utility to turn #rrggbb or rgb(r,g,b) into [red,green,blue] function colorToRgb(color) { + if (!color) { + return [0, 0, 0]; + } + if (color[0] === '#') { color = color.slice(1); if (color.length === 3) {