Remove the unnecessary buf to Uint8Array conversion

This commit is contained in:
Martynas Bagdonas 2023-08-03 19:50:57 +03:00 committed by Dan Stillman
parent b0b11cfcf5
commit 80da0fbb56

View file

@ -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,