Skip to content

Commit

Permalink
v2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lelinhtinh committed May 17, 2019
1 parent 7763346 commit 183daf1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jepub",
"version": "2.1.0",
"version": "2.1.1",
"description": "Generate simple EPUB books with JavaScript.",
"main": "src/jepub.js",
"scripts": {
Expand Down
6 changes: 4 additions & 2 deletions src/jepub.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ export default class jEpub {
ext = utils.mime2ext(mime);
} else if (data instanceof ArrayBuffer) {
ext = imageType(new Uint8Array(data));
mime = ext.mime;
if (ext) ext = utils.mime2ext(mime);
if (ext) {
mime = ext.mime;
ext = utils.mime2ext(mime);
}
} else {
throw 'Cover data is not valid';
}
Expand Down

0 comments on commit 183daf1

Please sign in to comment.