Skip to content

Commit ce4475f

Browse files
authored
No code action if no document (#1577)
1 parent a561f13 commit ce4475f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

testbed/server/src/server.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,9 @@ connection.onWorkspaceSymbol((params) => {
519519

520520
connection.onCodeAction((params) => {
521521
const document = documents.get(params.textDocument.uri);
522+
if (document === undefined) {
523+
return [];
524+
}
522525
const change: WorkspaceChange = new WorkspaceChange();
523526
change.createFile(`${folder}/newFile.bat`, { overwrite: true });
524527
const a = change.getTextEditChange(document);

0 commit comments

Comments
 (0)