Skip to content

Commit

Permalink
Fix reject of color hex that contains uppercase letters (#2673)
Browse files Browse the repository at this point in the history
  • Loading branch information
abaart authored Jan 26, 2021
1 parent 7807824 commit 0561076
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cvat-ui/src/components/labels-editor/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
Expand Down

0 comments on commit 0561076

Please sign in to comment.