From 96c87fc55d1e582753de45b4dc94b61ec3cdcbd4 Mon Sep 17 00:00:00 2001 From: tophf Date: Sun, 9 Aug 2020 15:03:20 +0300 Subject: [PATCH] fix colorpicker rgb/hsl parser with leading/trailing space --- vendor-overwrites/colorpicker/colorconverter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor-overwrites/colorpicker/colorconverter.js b/vendor-overwrites/colorpicker/colorconverter.js index 17eea98a..2889ef44 100644 --- a/vendor-overwrites/colorpicker/colorconverter.js +++ b/vendor-overwrites/colorpicker/colorconverter.js @@ -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;