diff --git a/notebook/static/services/config.js b/notebook/static/services/config.js index 9c5d7dda8..822306d9f 100644 --- a/notebook/static/services/config.js +++ b/notebook/static/services/config.js @@ -102,7 +102,21 @@ function(utils) { */ ConfigWithDefaults.prototype.get_sync = function(key) { var data = this._class_data(); - return key in data ? data[key] : this.defaults[key]; + if (key === undefined) { + // no key specified, return full config data + return $.extend(true, {}, this.defaults, data); + } + + var value = data[key]; + if (value !== undefined) { + if (typeof value == 'object') { + // merge with defaults if it's an object + return $.extend(true, {}, this.defaults[key], value); + } else { + return value; + } + } + return this.defaults[key]; }; /**