Skip to content

Commit fe7b40b

Browse files
committed
src/goEnvironmentStatus: avoid TypeError for notification closed without action
workbench.desktop.main.js:2247 TypeError: Cannot read property 'command' of undefined at /Users/hakim/.vscode-insiders/extensions/golang.go-0.25.0/dist/goMain.js:60913 at processTicksAndRejections (internal/process/task_queues.js:93) Change-Id: I50e345db15682028dc24a29584c604612cdb8364 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/321473 Trust: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Suzy Mueller <[email protected]>
1 parent f22b65a commit fe7b40b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/goEnvironmentStatus.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,8 +621,11 @@ export async function offerToInstallLatestGoVersion() {
621621
neverAgain
622622
)
623623
.then((selection) => {
624+
// TODO: should we removeGoStatus if user has closed the notification
625+
// without any action? It's kind of a feature now - without selecting
626+
// neverAgain, user can hide this statusbar item.
624627
removeGoStatus();
625-
selection.command();
628+
selection?.command();
626629
});
627630
});
628631
}

0 commit comments

Comments
 (0)