From 74095ffc710743e1c04e48c068a58b14d411065d Mon Sep 17 00:00:00 2001 From: Narendranath Gogineni Date: Thu, 2 Jan 2025 13:02:28 +0530 Subject: [PATCH] minot fix --- src/handlers/streamHandlerUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/streamHandlerUtils.ts b/src/handlers/streamHandlerUtils.ts index 3b6cb8c2..30dfd441 100644 --- a/src/handlers/streamHandlerUtils.ts +++ b/src/handlers/streamHandlerUtils.ts @@ -106,8 +106,8 @@ const enqueueFileContentAndUpdateOctetStreamBuffer = ( controller.enqueue( new TextEncoder().encode(JSON.stringify(transformedLine)) ); - controller.enqueue(new Uint8Array(Buffer.from('\r\n'))); - buffer = buffer.slice(line.length + 1)[0]; + controller.enqueue(new TextEncoder().encode('\r\n')); + buffer = buffer.slice(line.length + 1); } catch (error) { // this is not a valid json line, so we don't update the buffer }