From b7f63a40653bb92ab4dd128e154fac18aa8a30e9 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 20 Oct 2023 13:58:53 +1100 Subject: [PATCH] fix(ui): fix canvas color picker when value is zero good ol' zero is false-y --- .../web/src/features/canvas/hooks/useColorUnderCursor.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/invokeai/frontend/web/src/features/canvas/hooks/useColorUnderCursor.ts b/invokeai/frontend/web/src/features/canvas/hooks/useColorUnderCursor.ts index 0ade036987..5bdc59d345 100644 --- a/invokeai/frontend/web/src/features/canvas/hooks/useColorUnderCursor.ts +++ b/invokeai/frontend/web/src/features/canvas/hooks/useColorUnderCursor.ts @@ -37,7 +37,12 @@ const useColorPicker = () => { 1 ).data; - if (!(a && r && g && b)) { + if ( + r === undefined || + g === undefined || + b === undefined || + a === undefined + ) { return; }