diff --git a/src/utils.js b/src/utils.js index 94d09cf..b9aade2 100644 --- a/src/utils.js +++ b/src/utils.js @@ -59,7 +59,7 @@ const utils = { hex2rgb: (color) => { if (typeof color !== 'string') return [255, 0, 0]; - if (/^#[a-fA-F0-9]{3,6}$/.test()) { + if (/^#[a-fA-F0-9]{3,6}$/.test(color)) { throw new Error('#{color} isn\'t a supported hex color'); }