From 19a3266b6f14186bd0839fac8b2a04b5a29f32e7 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 1 Sep 2023 22:37:09 -0700 Subject: fix: :bug: avoid removing disallowed file windows --- extension/react-app/src/pages/gui.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'extension/react-app/src') diff --git a/extension/react-app/src/pages/gui.tsx b/extension/react-app/src/pages/gui.tsx index 35c17444..60ad0c2c 100644 --- a/extension/react-app/src/pages/gui.tsx +++ b/extension/react-app/src/pages/gui.tsx @@ -203,6 +203,8 @@ function GUI(props: GUIProps) { if (mainTextInputRef.current) { let input = (mainTextInputRef.current as any).inputValue; + if (input.trim() === "") return; + if (input.startsWith("#") && (input.length === 7 || input.length === 4)) { localStorage.setItem("continueButtonColor", input); (mainTextInputRef.current as any).setInputValue(""); @@ -241,7 +243,6 @@ function GUI(props: GUIProps) { return; } } - if (input.trim() === "") return; client.sendMainInput(input); dispatch(temporarilyPushToUserInputQueue(input)); -- cgit v1.2.3-70-g09d2