Fixing issue #444 color function chokes on non-string param (#447)

This commit is contained in:
Maxime Beauchemin
2016-05-10 09:22:59 -07:00
parent a75d6bc52c
commit 77e9e6a5d7

View File

@@ -48,6 +48,7 @@ var color = function () {
var seen = {};
return function (s) {
if (!s) { return; }
s = String(s);
// next line is for caravel series that should have the same color
s = s.replace('---', '');
if (seen[s] === undefined) {