From 49095862d309f0b6fca0a70a340a38fd050225a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=A4rtl?= Date: Thu, 29 Aug 2024 10:36:28 +0200 Subject: [PATCH] Replace bytes with arrayBuffer Fixes #572 --- src/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index ab1d7a04..3f909c81 100644 --- a/src/main.js +++ b/src/main.js @@ -96,8 +96,9 @@ export default async () => { }); }; - const buffer = await model.mainFile[1].bytes(); - return await validateBytes(buffer, {externalResourceFunction: externalRefFunction, uri: model.mainFile[0]}); + const buffer = await model.mainFile[1].arrayBuffer(); + return await validateBytes(new Uint8Array(buffer), + {externalResourceFunction: externalRefFunction, uri: model.mainFile[0]}); } } catch (error) { console.error(error);