From 01fa31d78fcffbee0413b0fd3a767fa1f7d9fd40 Mon Sep 17 00:00:00 2001 From: CorBob Date: Mon, 4 Feb 2019 22:05:21 -0800 Subject: [PATCH 1/2] Check that item has a Name property --- src/features/ShowHelp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/ShowHelp.ts b/src/features/ShowHelp.ts index 756f2f71f7..63b0329190 100644 --- a/src/features/ShowHelp.ts +++ b/src/features/ShowHelp.ts @@ -22,7 +22,7 @@ export class ShowHelpFeature implements IFeature { "Unable to instantiate; language client undefined."); return; } - if (item === undefined) { + if (item === undefined || !item.hasOwnProperty("Name")) { const editor = vscode.window.activeTextEditor; From 63340215548ffc7186fb4a8cbed6ed937991b1cc Mon Sep 17 00:00:00 2001 From: Tyler James Leonhardt Date: Wed, 6 Feb 2019 10:48:21 -0800 Subject: [PATCH 2/2] Update src/features/ShowHelp.ts Do a truthy check instead. Co-Authored-By: corbob <30301021+corbob@users.noreply.github.com> --- src/features/ShowHelp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/ShowHelp.ts b/src/features/ShowHelp.ts index 63b0329190..3322a43f66 100644 --- a/src/features/ShowHelp.ts +++ b/src/features/ShowHelp.ts @@ -22,7 +22,7 @@ export class ShowHelpFeature implements IFeature { "Unable to instantiate; language client undefined."); return; } - if (item === undefined || !item.hasOwnProperty("Name")) { + if (!item || !item.Name) { const editor = vscode.window.activeTextEditor;