From 28fe7083878b92466d41e8cfaf0852ac5d9db88e Mon Sep 17 00:00:00 2001 From: rachel-mp4 Date: Thu, 6 Nov 2025 17:19:06 -0500 Subject: [PATCH] hopefully this helps with bug --- src/lib/wscontext.svelte.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/wscontext.svelte.ts b/src/lib/wscontext.svelte.ts index 4285d64..f4df723 100644 --- a/src/lib/wscontext.svelte.ts +++ b/src/lib/wscontext.svelte.ts @@ -541,6 +541,9 @@ const b64encodebytearray = (u8: Uint8Array): string => { } const insertSIntoAStringAtIdx = (s: string, a: string, idx: number) => { + if (a === undefined) { + a = "" + } if (idx > a.length) { a = a.padEnd(idx) } @@ -548,6 +551,9 @@ const insertSIntoAStringAtIdx = (s: string, a: string, idx: number) => { } const deleteFromAStringBetweenIdxs = (a: string, idx1: number, idx2: number) => { + if (a === undefined) { + a = "" + } if (idx2 > a.length) { a = a.padEnd(idx2) } -- 2.51.2