From 3d970acc3421cd3eb5abb74a7386a5f54dd86313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hatcher?= Date: Thu, 13 Nov 2025 19:34:16 +0100 Subject: [PATCH] FIX: Make biome happy --- .../app.ironcalc.com/frontend/src/components/rpc.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/webapp/app.ironcalc.com/frontend/src/components/rpc.ts b/webapp/app.ironcalc.com/frontend/src/components/rpc.ts index 311954f..1dd8cef 100644 --- a/webapp/app.ironcalc.com/frontend/src/components/rpc.ts +++ b/webapp/app.ironcalc.com/frontend/src/components/rpc.ts @@ -54,12 +54,15 @@ export async function get_documentation_model( export async function downloadModel(bytes: Uint8Array, fileName: string) { const sanitizedFileName = sanitizeFileName(fileName); + // Create a real ArrayBuffer and copy the data + const buffer = new ArrayBuffer(bytes.byteLength); + new Uint8Array(buffer).set(bytes); const response = await fetch("/api/download", { method: "POST", headers: { "Content-Type": "application/octet-stream", }, - body: bytes, + body: buffer, }); if (!response.ok) { throw new Error("Network response was not ok"); @@ -82,12 +85,16 @@ export async function downloadModel(bytes: Uint8Array, fileName: string) { } export async function shareModel(bytes: Uint8Array): Promise { + // Create a real ArrayBuffer and copy the data + const buffer = new ArrayBuffer(bytes.byteLength); + new Uint8Array(buffer).set(bytes); + const response = await fetch("/api/share", { method: "POST", headers: { "Content-Type": "application/octet-stream", }, - body: bytes, + body: buffer, }); if (!response.ok) { throw new Error("Network response was not ok");