We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebaa7b5 commit 02b367bCopy full SHA for 02b367b
src/vs/workbench/services/configuration/common/jsonEditingService.ts
@@ -110,11 +110,13 @@ export class JSONEditingService implements IJSONEditingService {
110
const model = reference.object.textEditorModel;
111
112
if (this.hasParseErrors(model)) {
113
+ reference.dispose();
114
return this.reject<IReference<IResolvedTextEditorModel>>(JSONEditingErrorCode.ERROR_INVALID_FILE);
115
}
116
117
// Target cannot be dirty if not writing into buffer
118
if (checkDirty && this.textFileService.isDirty(resource)) {
119
120
return this.reject<IReference<IResolvedTextEditorModel>>(JSONEditingErrorCode.ERROR_FILE_DIRTY);
121
122
0 commit comments