fix: if we have an error throw before we try to read anything
This commit is contained in:
parent
e64144da6a
commit
02d281162b
|
@ -62,11 +62,11 @@ export default class IPFSProvider implements ContentProvider {
|
||||||
err = "404";
|
err = "404";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
throw new Error(err);
|
throw new Error(err);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
let bufferRead = 0;
|
let bufferRead = 0;
|
||||||
const fileTypeBufferLength = 4100;
|
const fileTypeBufferLength = 4100;
|
||||||
|
|
Loading…
Reference in New Issue