Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

fix decoding imported data from backend (#722)

David Luzar3b20e6e2b80c
diff --git a/src/scene/data.ts b/src/scene/data.ts
index 097cd78404..8dde96a636 100644
--- a/src/scene/data.ts
+++ b/src/scene/data.ts
@@ -252,8 +252,7 @@ export async function importFromBackend(
buffer,
);
// We need to convert the decrypted array buffer to a string
- const string = String.fromCharCode.apply(
- null,
+ const string = new window.TextDecoder("utf-8").decode(
new Uint8Array(decrypted) as any,
);
data = JSON.parse(string);