Skip to content

Commit ef57bce

Browse files
authored
Merge pull request #439 from ownego/fix-color-picker-bug
Update: handle initial Value is in upper case value
2 parents 9e75139 + dac2e94 commit ef57bce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/ColorPicker/ColorPicker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ if (typeof model.value === 'string') {
137137
let colorRgb: RGBAColor;
138138
139139
// Convert from hex to rgba object
140-
if (/#[0-9abcdef]{3,6}/.test(model.value)) {
140+
if (/#[0-9abcdef]{3,6}/.test(model.value?.toLowerCase())) {
141141
colorRgb = { ...hexToRgb(model.value), alpha: 1 };
142142
} else {
143143
// Convert from rgba string to object

0 commit comments

Comments
 (0)