diff --git a/server/index.js b/server/index.js index 14e4199..a1c12fd 100644 --- a/server/index.js +++ b/server/index.js @@ -42,10 +42,10 @@ const getParamKey = val => { const n = num(val) if (!val.length) { return null - } else if (isHex(val)) { - return { color: '#' + val } } else if (!isNaN(n)) { return { size: n } + } else if (isHex(val)) { + return { color: '#' + val } } else if (type === 'string' && !/\-/.test(val)) { return { [val]: true } } else if (type === 'string' && /\-/.test(val)) {