Fixing missing return value
This commit is contained in:
10
src/epub.ts
10
src/epub.ts
@ -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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user