From 40ceda37ef3872a8f5c204543a6c79d8fd0eb997 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 21 Aug 2022 21:51:33 -0400 Subject: [PATCH] *Update chunk length check to use the buffer and check byteOffset --- src/contentProviders/ipfsProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contentProviders/ipfsProvider.ts b/src/contentProviders/ipfsProvider.ts index b175a71..716877f 100644 --- a/src/contentProviders/ipfsProvider.ts +++ b/src/contentProviders/ipfsProvider.ts @@ -222,7 +222,7 @@ export default class IpfsProvider extends BaseProvider { let cacheBuffer: Uint8Array[] | Uint8Array = []; const receiveUpdate = (chunk: Uint8Array) => { - if (!chunk.length && !chunk.byteLength) { + if (!chunk.buffer.byteLength && chunk.byteOffset === 0) { return filterPromise; } if (