From 25ce95a8b30324555127caaac1fff4b224f9850e Mon Sep 17 00:00:00 2001 From: Christian Paul Date: Wed, 17 Oct 2018 22:41:01 -0700 Subject: [PATCH] Fix: test the variable color --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'); }