diff options
-rw-r--r-- | lib/book.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/book.js b/lib/book.js index 477283f..ce368a3 100644 --- a/lib/book.js +++ b/lib/book.js @@ -16,7 +16,7 @@ var Promise = require('./utils/promise'); function Book(opts) { if (!(this instanceof Book)) return new Book(opts); - opts = _.defaults(opts || {}, { + this.opts = _.defaults(opts || {}, { fs: null, // Root path for the book @@ -156,11 +156,10 @@ Book.prototype.parse = function() { // Create a new book for each language and parse it return Promise.serie(that.langs.list(), function(lang) { that.log.debug.ln('Preparing book for language', lang.id); - var langBook = new Book({ - fs: that.fs, + var langBook = new Book(_.extend({}, that.opts, { parent: that, root: that.resolve(lang.id) - }); + })); that.books.push(langBook); |