mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-24 11:26:31 +00:00
Fix validation of configuration for plugins
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user