diff --git a/lib/ace/config.js b/lib/ace/config.js index 05d5f015..e3bd8da2 100644 --- a/lib/ace/config.js +++ b/lib/ace/config.js @@ -260,15 +260,18 @@ exports.resetOptions = function(obj) { exports.setDefaultValue = function(path, name, value) { var opts = defaultOptions[path] || (defaultOptions[path] = {}); - if (typeof name == "string") { - if (opts[name]) + if (opts[name]) { + if (opts.forwardTo) + exports.setDefaultValue(opts.forwardTo, name, value) + else opts[name].value = value; - } else { - Object.keys(name).forEach(function(key) { - if (opts[key]) - opts[key].value = name[key]; - }); } }; +exports.setDefaultValues = function(path, optionHash) { + Object.keys(optionHash).forEach(function(key) { + exports.setDefaultValue(path, key, optionHash[key]); + }); +}; + });