diff --git a/src/vs/workbench/services/configuration/common/jsonEditingService.ts b/src/vs/workbench/services/configuration/common/jsonEditingService.ts index 31ca52ef0f0e5..13ce581ba64d2 100644 --- a/src/vs/workbench/services/configuration/common/jsonEditingService.ts +++ b/src/vs/workbench/services/configuration/common/jsonEditingService.ts @@ -51,7 +51,7 @@ export class JSONEditingService implements IJSONEditingService { let hasEdits: boolean = false; for (const value of values) { const edit = this.getEdits(model, value)[0]; - hasEdits = this.applyEditsToBuffer(edit, model); + hasEdits = !!edit && this.applyEditsToBuffer(edit, model); } if (hasEdits) { return this.textFileService.save(model.uri);