summaryrefslogtreecommitdiffstats
path: root/lib/output/ebook.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-25 15:12:04 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-25 15:12:04 +0100
commit9253b764fad8452fb1cf0760be482b692fdfb728 (patch)
tree6d41da58e39bd2e4bfd02449dc164778fe932467 /lib/output/ebook.js
parent393aed62706745e2abde300844143b5d2a0c9041 (diff)
downloadgitbook-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.js5
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;