mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
undefined !== null and JSON.stringify should know that, fix #12812
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import {mixin} from 'vs/base/common/objects';
|
||||
import {illegalState} from 'vs/base/common/errors';
|
||||
import Event, {Emitter} from 'vs/base/common/event';
|
||||
import {WorkspaceConfiguration} from 'vscode';
|
||||
import {ExtHostConfigurationShape, MainThreadConfigurationShape} from './extHost.protocol';
|
||||
import {ConfigurationTarget} from 'vs/workbench/services/configuration/common/configurationEditing';
|
||||
import { mixin } from 'vs/base/common/objects';
|
||||
import { illegalState } from 'vs/base/common/errors';
|
||||
import Event, { Emitter } from 'vs/base/common/event';
|
||||
import { WorkspaceConfiguration } from 'vscode';
|
||||
import { ExtHostConfigurationShape, MainThreadConfigurationShape } from './extHost.protocol';
|
||||
import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing';
|
||||
|
||||
export class ExtHostConfiguration extends ExtHostConfigurationShape {
|
||||
|
||||
@@ -56,7 +56,11 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape {
|
||||
update: (key: string, value: any, global: boolean) => {
|
||||
key = section ? `${section}.${key}` : key;
|
||||
const target = global ? ConfigurationTarget.USER : ConfigurationTarget.WORKSPACE;
|
||||
return this._proxy.$updateConfigurationOption(target, key, value);
|
||||
if (value !== void 0) {
|
||||
return this._proxy.$updateConfigurationOption(target, key, value);
|
||||
} else {
|
||||
return this._proxy.$removeConfigurationOption(target, key);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user