diff --git a/package.json b/package.json index 8144a96..8280a0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@carbonplan/components", - "version": "12.6.0", + "version": "12.6.1", "description": "shared components for our websites", "main": "dst/index.js", "module": "dst/index.esm.js", diff --git a/src/colorbar.js b/src/colorbar.js index 39557c2..882e4cd 100644 --- a/src/colorbar.js +++ b/src/colorbar.js @@ -37,7 +37,7 @@ const hexToRgb = (hex) => { const Gradient = ({ colormap, discrete, horizontal, width, height }) => { const step = (1 / colormap.length) * 100 - const isHex = colormap[0].startsWith('#') + const isHex = String(colormap[0]).startsWith('#') const values = colormap.map((color, i) => { const rgbColor = isHex ? hexToRgb(color) : color const position = `${i * step}% ${