Spaces:
Sleeping
Sleeping
Adrien Denat
commited on
Commit
•
743240e
1
Parent(s):
958c233
make sure we can't send empty messages
Browse files- src/routes/+page.svelte +2 -0
src/routes/+page.svelte
CHANGED
@@ -26,6 +26,8 @@
|
|
26 |
});
|
27 |
|
28 |
function onWrite() {
|
|
|
|
|
29 |
messages = [...messages, { from: 'user', content: message }];
|
30 |
message = '';
|
31 |
const inputs =
|
|
|
26 |
});
|
27 |
|
28 |
function onWrite() {
|
29 |
+
if (!message) return;
|
30 |
+
|
31 |
messages = [...messages, { from: 'user', content: message }];
|
32 |
message = '';
|
33 |
const inputs =
|