diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-04-02 09:43:48 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-04-02 09:43:48 +0200 |
commit | 12c06b384f4fcf69c1b283b924d8823c23737972 (patch) | |
tree | 884a7efe50daa2b53d1b2fbac9a8107f7993e287 /lib/configuration.js | |
parent | 82a58e7ac3c78bd30a3528956490d325b6424523 (diff) | |
download | gitbook-12c06b384f4fcf69c1b283b924d8823c23737972.zip gitbook-12c06b384f4fcf69c1b283b924d8823c23737972.tar.gz gitbook-12c06b384f4fcf69c1b283b924d8823c23737972.tar.bz2 |
Don't fail if config doesn't exists
Diffstat (limited to 'lib/configuration.js')
-rw-r--r-- | lib/configuration.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/configuration.js b/lib/configuration.js index a26135c..d206505 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -98,14 +98,14 @@ Configuration.prototype.load = function() { .then(function() { var configPath, config; - configPath = require.resolve( - path.resolve(that.book.root, that.options.configFile) - ); + try { + configPath = require.resolve( + path.resolve(that.book.root, that.options.configFile) + ); - // Invalidate node.js cache for livreloading - delete require.cache[configPath]; + // Invalidate node.js cache for livreloading + delete require.cache[configPath]; - try { _config = require(configPath); that.options = _.merge( that.options, |