Fix: test the variable color

pull/46/head
Christian Paul 2018-10-17 22:41:01 -07:00
rodzic 7a313c8a7c
commit 25ce95a8b3
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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');
}