From 8fde82fc3d98a8a3bf11224a83c68823553981ba Mon Sep 17 00:00:00 2001 From: Aleksandr Krotov Date: Sat, 25 Apr 2026 13:08:26 +0300 Subject: [PATCH] Fix race condition --- src/stream.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stream.ts b/src/stream.ts index f2f7f1d..c626782 100644 --- a/src/stream.ts +++ b/src/stream.ts @@ -376,7 +376,7 @@ export function streamApi( chat_id, draft_id: draft.id, text: draft.text, - entities: draft.entities, + entities: [...draft.entities], // copy because it is consurrently mutable ...otherMessageDraft, }, signal); continue;