Fixing missing return value

This commit is contained in:
Fabian Stamm
2018-09-21 12:33:32 +02:00
parent 6a07f1fa53
commit 05667d10ba
5 changed files with 7 additions and 21 deletions

View File

@ -728,15 +728,7 @@ export class EPub {
**/
async getFile(id) {
if (this.manifest[id]) {
let data = await this.zip.files[this.manifest[id].href].async("nodebuffer");
// this.zip.files(this.manifest[id].href, (function (err, data) {
// if (err) {
// callback(new Error("Reading archive failed"));
// return;
// }
// callback(null, data, this.manifest[id]['media-type']);
// }).bind(this));
return await this.zip.files[this.manifest[id].href].async("nodebuffer");
} else {
throw new Error("File not found");
}