From 773f2637d2a93c372ff9ac8bd9e92e3e21a89dbd Mon Sep 17 00:00:00 2001 From: EcoleKeine Date: Mon, 26 Aug 2024 09:16:28 +0800 Subject: [PATCH] Allow the input chat string to be empty when have attachments. --- frontend/src/components/organisms/chat/inputBox/input.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/organisms/chat/inputBox/input.tsx b/frontend/src/components/organisms/chat/inputBox/input.tsx index 78f64c2e0b..57d7a06913 100644 --- a/frontend/src/components/organisms/chat/inputBox/input.tsx +++ b/frontend/src/components/organisms/chat/inputBox/input.tsx @@ -102,7 +102,7 @@ const Input = memo( }, [loading, disabled]); const submit = useCallback(() => { - if (value === '' || disabled) { + if (disabled || (value === '' && attachments.length === 0)) { return; } if (askUser) {