From 80da0fbb56c3e60b27795997a78432feb5b6ee57 Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Thu, 3 Aug 2023 19:50:57 +0300 Subject: [PATCH] Remove the unnecessary buf to Uint8Array conversion --- chrome/content/zotero/xpcom/reader.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index a208b7b83c..2fa2d25921 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -516,9 +516,6 @@ class ReaderInstance { throw new Error(`The file "${path}" is too large`); } let buf = await OS.File.read(path, {}); - // TODO during buf -> data object migration: Do we actually need to get the underlying buffer and wrap it - // in a new Uint8Array? - buf = new Uint8Array(new Uint8Array(buf).buffer); let baseURI = `zotero://attachment/${Zotero.API.getLibraryPrefix(item.libraryID)}/items/${item.key}/`; return { buf,