fix: if we have an error throw before we try to read anything

This commit is contained in:
Derrick Hammer 2023-10-15 16:22:51 -04:00
parent e64144da6a
commit 02d281162b
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 3 deletions

View File

@ -62,11 +62,11 @@ export default class IPFSProvider implements ContentProvider {
err = "404";
}
}
}
if (err) {
throw new Error(err);
}
}
let bufferRead = 0;
const fileTypeBufferLength = 4100;