Skip to content

Commit c1d429c

Browse files
committed
fix(docs): DR-7571 only open sidebar when input is non-empty
1 parent a7e374b commit c1d429c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/docs/src/components/floating-ask.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ export function FloatingAsk() {
2424
}, [checkScroll]);
2525

2626
const handleSubmit = () => {
27-
if (inputValue.trim()) {
28-
setPendingMessage(inputValue.trim());
29-
}
27+
const val = inputValue.trim();
28+
if (!val) return;
29+
setPendingMessage(val);
3030
setIsOpen(true);
3131
setInputValue("");
3232
};

0 commit comments

Comments
 (0)