aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/commands.ts')
-rw-r--r--editors/code/src/commands.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts
index b22cd450b..24c2e196d 100644
--- a/editors/code/src/commands.ts
+++ b/editors/code/src/commands.ts
@@ -421,12 +421,10 @@ export function gotoLocation(ctx: Ctx): Cmd {
421 421
422export function openDocs(ctx: Ctx): Cmd { 422export function openDocs(ctx: Ctx): Cmd {
423 return async () => { 423 return async () => {
424 console.log("running openDocs");
425 424
426 const client = ctx.client; 425 const client = ctx.client;
427 const editor = vscode.window.activeTextEditor; 426 const editor = vscode.window.activeTextEditor;
428 if (!editor || !client) { 427 if (!editor || !client) {
429 console.log("not yet ready");
430 return 428 return
431 }; 429 };
432 430
@@ -435,7 +433,9 @@ export function openDocs(ctx: Ctx): Cmd {
435 433
436 const doclink = await client.sendRequest(ra.openDocs, { position, textDocument }); 434 const doclink = await client.sendRequest(ra.openDocs, { position, textDocument });
437 435
438 vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(doclink.remote)); 436 if (doclink != null) {
437 vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(doclink));
438 }
439 }; 439 };
440 440
441} 441}