From dd31fda41ae641de2499c97c7a0e00fb7071e2b1 Mon Sep 17 00:00:00 2001 From: Francisco Lopez Date: Mon, 12 Feb 2024 19:33:01 -0500 Subject: [PATCH] Fixed bug for Show Panel command --- src/extension.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/extension.ts b/src/extension.ts index 0022e27..83e2531 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -60,7 +60,18 @@ function activate(context: vscode.ExtensionContext) { // Command to show panel if it is hidden const showPanel: vscode.Disposable = vscode.commands.registerCommand('myExtension.showPanel', () => { - panel.reveal(columnToShowIn); + if (!panel) { + + showNotification({message: 'Please select root file of app', timeout: 3000}); + return; + + } else { + + panel.reveal(columnToShowIn); + return; + + } + }); context.subscriptions.push(pickFile, showPanel);