fix colorpicker rgb/hsl parser with leading/trailing space
This commit is contained in:
parent
d18314357f
commit
96c87fc55d
|
@ -106,7 +106,7 @@ const colorConverter = (() => {
|
|||
if (!type) return;
|
||||
|
||||
const comma = value.includes(',') && !value.includes('/');
|
||||
const num = value.split(comma ? /\s*,\s*/ : /\s+(?!\/)|\s*\/\s*/);
|
||||
const num = value.trim().split(comma ? /\s*,\s*/ : /\s+(?!\/)|\s*\/\s*/);
|
||||
if (num.length < 3 || num.length > 4) return;
|
||||
if (num[3] && !validateAlpha(num[3])) return null;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user