alpha may be undefined
This commit is contained in:
parent
ae2c53c2f0
commit
4502c47c82
|
@ -461,7 +461,7 @@
|
||||||
const newHSV = color.type === 'hsl' ?
|
const newHSV = color.type === 'hsl' ?
|
||||||
colorConverter.HSLtoHSV(color) :
|
colorConverter.HSLtoHSV(color) :
|
||||||
colorConverter.RGBtoHSV(color);
|
colorConverter.RGBtoHSV(color);
|
||||||
if (Object.keys(newHSV).every(k => Math.abs(newHSV[k] - HSV[k]) < 1e-3)) {
|
if (Object.entries(newHSV).every(([k, v]) => v === HSV[k] || Math.abs(v - HSV[k]) < 1e-3)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
HSV = newHSV;
|
HSV = newHSV;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user