未验证 提交 74f9a3d2 编写于 作者: S Sandeep Somavarapu 提交者: GitHub

Merge pull request #99912 from gjsjohnmurray/fix-99854

fix #99854 make 'Edit in settings.json' add object-type default
......@@ -614,7 +614,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic
const type = schema ? schema.type : 'object' /* Override Identifier */;
let setting = settingsModel.getPreference(settingKey);
if (!setting) {
const defaultValue = type === 'array' ? this.configurationService.inspect(settingKey).defaultValue : getDefaultValue(type);
const defaultValue = (type === 'object' || type === 'array') ? this.configurationService.inspect(settingKey).defaultValue : getDefaultValue(type);
if (defaultValue !== undefined) {
const key = settingsModel instanceof WorkspaceConfigurationEditorModel ? ['settings', settingKey] : [settingKey];
await this.jsonEditingService.write(settingsModel.uri!, [{ path: key, value: defaultValue }], false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册