*Update chunk length check to use the buffer and check byteOffset

This commit is contained in:
Derrick Hammer 2022-08-21 21:51:33 -04:00
parent abc7a31e80
commit 40ceda37ef
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

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