Fix a crash when trying to set the default color

This commit is contained in:
Jean-Baptiste Emmanuel Zorg 2024-11-20 18:18:49 +01:00
parent 4f16cce206
commit 2a85a79daf

View file

@ -97,7 +97,7 @@ function ColorPickerStartPick(Event) {
var X = C.X;
var Y = C.Y;
if (X >= ColorPickerX && X < ColorPickerX + ColorPickerWidth) {
if (ItemColorState.editOpacity && MouseIn(1201, 72, 218, 48)) {
if (ItemColorState?.editOpacity && MouseIn(1201, 72, 218, 48)) {
document.addEventListener("mousemove", ColorPickerPickOpacity);
document.addEventListener("touchmove", ColorPickerPickOpacity);
ColorPickerPickOpacity(Event);