mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
getConfiguration should not crash when section denotes a value, #1396
This commit is contained in:
@@ -41,9 +41,14 @@ export class ExtHostConfiguration {
|
||||
? ExtHostConfiguration._lookUp(section, this._config)
|
||||
: this._config;
|
||||
|
||||
let result: any;
|
||||
if (typeof config !== 'object') {
|
||||
// this catches missing config and accessing values
|
||||
result = {};
|
||||
} else {
|
||||
result = clone(config);
|
||||
}
|
||||
|
||||
let result = config ? clone(config) : {};
|
||||
// result = Object.freeze(result);
|
||||
result.has = function(key: string): boolean {
|
||||
return typeof ExtHostConfiguration._lookUp(key, config) !== 'undefined';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user