Skip to content

Commit fbb3679

Browse files
committed
1 parent 02b367b commit fbb3679

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/vs/workbench/services/keybinding/common/keybindingEditing.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,12 @@ export class KeybindingsEditingService extends Disposable implements IKeybinding
230230
if (model.getValue()) {
231231
const parsed = this.parse(model);
232232
if (parsed.parseErrors.length) {
233+
reference.dispose();
233234
return Promise.reject<any>(new Error(localize('parseErrors', "Unable to write to the keybindings configuration file. Please open it to correct errors/warnings in the file and try again.")));
234235
}
235236
if (parsed.result) {
236237
if (!isArray(parsed.result)) {
238+
reference.dispose();
237239
return Promise.reject<any>(new Error(localize('errorInvalidConfiguration', "Unable to write to the keybindings configuration file. It has an object which is not of type Array. Please open the file to clean up and try again.")));
238240
}
239241
} else {

0 commit comments

Comments
 (0)