From 05610764680a01d2f2e761ae4bae5cf724ff94cb Mon Sep 17 00:00:00 2001 From: abaart Date: Tue, 26 Jan 2021 10:47:04 +0100 Subject: [PATCH] Fix reject of color hex that contains uppercase letters (#2673) --- cvat-ui/src/components/labels-editor/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvat-ui/src/components/labels-editor/common.ts b/cvat-ui/src/components/labels-editor/common.ts index aeec12b10755..f843218e2e70 100644 --- a/cvat-ui/src/components/labels-editor/common.ts +++ b/cvat-ui/src/components/labels-editor/common.ts @@ -72,7 +72,7 @@ export function validateParsedLabel(label: Label): void { throw new Error(`Label "${label.name}". ` + `Label color must be a string. Got ${typeof label.color}`); } - if (!label.color.match(/^#[0-9a-f]{6}$|^$/)) { + if (!label.color.match(/^#[0-9a-fA-F]{6}$|^$/)) { throw new Error( `Label "${label.name}". ` + `Type of label color must be only a valid color string. Got value ${label.color}`,