diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-25 15:12:04 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-25 15:12:04 +0100 |
commit | 9253b764fad8452fb1cf0760be482b692fdfb728 (patch) | |
tree | 6d41da58e39bd2e4bfd02449dc164778fe932467 /lib/output/ebook.js | |
parent | 393aed62706745e2abde300844143b5d2a0c9041 (diff) | |
download | gitbook-9253b764fad8452fb1cf0760be482b692fdfb728.zip gitbook-9253b764fad8452fb1cf0760be482b692fdfb728.tar.gz gitbook-9253b764fad8452fb1cf0760be482b692fdfb728.tar.bz2 |
Don't pass cover to ebook-convert if non existant
Diffstat (limited to 'lib/output/ebook.js')
-rw-r--r-- | lib/output/ebook.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/output/ebook.js b/lib/output/ebook.js index a74af41..228a025 100644 --- a/lib/output/ebook.js +++ b/lib/output/ebook.js @@ -113,8 +113,9 @@ EbookOutput.prototype.locateCover = function() { cover = this.resolve(cover); // Cover doesn't exist and multilingual? - if (!fs.existsSync(cover) && this.parent) { - return this.parent.locateCover(); + if (!fs.existsSync(cover)) { + if (this.parent) return this.parent.locateCover() + else return undefined; } return cover; |