mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
fixes #5981: [json] accept empty keybindings.json file
This commit is contained in:
@@ -210,6 +210,12 @@ function updateConfiguration() {
|
||||
|
||||
|
||||
function validateTextDocument(textDocument: ITextDocument): void {
|
||||
if (textDocument.getText().length === 0) {
|
||||
// ignore empty documents
|
||||
connection.sendDiagnostics({ uri: textDocument.uri, diagnostics: [] });
|
||||
return;
|
||||
}
|
||||
|
||||
let jsonDocument = getJSONDocument(textDocument);
|
||||
jsonSchemaService.getSchemaForResource(textDocument.uri, jsonDocument).then(schema => {
|
||||
if (schema) {
|
||||
|
||||
Reference in New Issue
Block a user