From 79acbd110535543490f693069f43c06006b1e886 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sun, 8 May 2016 07:45:33 -0700 Subject: [PATCH] Fixing issue #444 color function chokes on non-string param --- caravel/assets/javascripts/modules/caravel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/caravel/assets/javascripts/modules/caravel.js b/caravel/assets/javascripts/modules/caravel.js index b6b881077eab6..4d92951f1dbe6 100644 --- a/caravel/assets/javascripts/modules/caravel.js +++ b/caravel/assets/javascripts/modules/caravel.js @@ -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) {