summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-02-17 21:35:25 +0100
committerSamy Pesse <samypesse@gmail.com>2016-02-17 21:35:25 +0100
commit3d1eac234a1633f4822fd019464434124875b7b1 (patch)
tree1e6a9482f6d73b5f5a12eb4778ccf64cfe867562 /lib/plugins
parenta78e52812f5086612fe4ba20c822fee30eb6eaa5 (diff)
downloadgitbook-3d1eac234a1633f4822fd019464434124875b7b1.zip
gitbook-3d1eac234a1633f4822fd019464434124875b7b1.tar.gz
gitbook-3d1eac234a1633f4822fd019464434124875b7b1.tar.bz2
Move comment about substack/node-resolve#81
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/plugin.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/plugins/plugin.js b/lib/plugins/plugin.js
index 0216a18..ae8886c 100644
--- a/lib/plugins/plugin.js
+++ b/lib/plugins/plugin.js
@@ -8,11 +8,11 @@ var gitbook = require('../gitbook');
var registry = require('./registry');
// Return true if an error is a "module not found"
+// Wait on https://github.com/substack/node-resolve/pull/81 to be merged
function isModuleNotFound(err) {
return err.message.indexOf('Cannot find module') >= 0;
}
-
function BookPlugin(book, pluginId) {
this.book = book;
this.log = this.book.log;
@@ -52,7 +52,6 @@ BookPlugin.prototype.load = function() {
that.root = path.dirname(res);
that.packageInfos = require(res);
} catch (err) {
- // Wait on https://github.com/substack/node-resolve/pull/81 to be merged
if (!isModuleNotFound(err)) throw err;
that.packageInfos = undefined;