Fix validation of configuration for plugins

This commit is contained in:
Samy Pesse
2016-04-29 23:19:33 +02:00
parent db1a0aedf8
commit 9acccad23a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ Config.prototype.getValue = function(keyPath, def) {
keyPath = Config.keyToKeyPath(keyPath);
if (!values.hasIn(keyPath)) {
return def;
return Immutable.fromJS(def);
}
return values.getIn(keyPath);
+1 -1
View File
@@ -22,7 +22,7 @@ function validatePluginConfig(book, plugin) {
plugin.getName()
].join('.');
var pluginConfig = config.getValue(configKey, {});
var pluginConfig = config.getValue(configKey, {}).toJS();
var schema = (packageInfos.get('gitbook') || Immutable.Map()).toJS();
if (!schema) return book;