From 7a2dde7448c044c8509628a94768fdf6b9c41f7f Mon Sep 17 00:00:00 2001 From: ayangweb <75017711+ayangweb@users.noreply.github.com> Date: Tue, 10 Jun 2025 17:22:13 +0800 Subject: [PATCH] refactor: check if the message block is purely blank (#651) --- src/hooks/useStreamChat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useStreamChat.ts b/src/hooks/useStreamChat.ts index 4a031adb..81682c35 100644 --- a/src/hooks/useStreamChat.ts +++ b/src/hooks/useStreamChat.ts @@ -63,7 +63,7 @@ export const useStreamChat = (options: Options) => { } // If the chunk data does not contain a message_chunk, we ignore it - if (chunkData.message_chunk) { + if (chunkData.message_chunk.trim()) { setVisible(true); }