From 6bcfbdd44e6ddb7d51c3a3a0d87d8fcac3e646e3 Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Wed, 18 Mar 2020 10:26:07 -0700 Subject: [PATCH] Check for undefined --- src/assets.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/assets.ts b/src/assets.ts index ac1591013..7de9c096e 100644 --- a/src/assets.ts +++ b/src/assets.ts @@ -304,7 +304,7 @@ export function createWebLaunchConfiguration(programPath: string, workingDirecto // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser "serverReadyAction": { "action": "openExternally", - "pattern": "^\\\\s*Now listening on:\\\\s+(https?://\\\\S+)" + "pattern": "^\\\\s*Now listening on:\\\\s+(https?://\\\\S+)" }, "env": { "ASPNETCORE_ENVIRONMENT": "Development" @@ -549,7 +549,12 @@ async function promptToAddAssets(workspaceFolder: vscode.WorkspaceFolder) { if (!csharpConfig.get('supressBuildAssetsNotification')) { vscode.window.showWarningMessage( `Required assets to build and debug are missing from '${projectName}'. Add them?`, disableItem, noItem, yesItem) - .then(selection => resolve(selection.result)); + .then(selection => { + if (selection) + { + resolve(selection.result); + } + }); } }); }