diff --git a/vss-extension-dev.json b/vss-extension-dev.json index 53a7313..f4713a9 100644 --- a/vss-extension-dev.json +++ b/vss-extension-dev.json @@ -1,7 +1,7 @@ { "manifestVersion": 1, "id": "GHAzDoWidget-DEV", - "version": "0.0.1.66", + "version": "0.0.1.67", "public": false, "name": "Advanced Security dashboard Widgets [DEV]", "description": "[DEV] GitHub Advanced Security for Azure DevOps dashboard widgets", diff --git a/widget_1x1/widget_1x1.html b/widget_1x1/widget_1x1.html index fae54bf..1298b90 100644 --- a/widget_1x1/widget_1x1.html +++ b/widget_1x1/widget_1x1.html @@ -17,21 +17,16 @@ { WidgetHelpers.IncludeWidgetStyles(); VSS.register("GHAzDoWidget.1x1", function () { - try { - const webContext = VSS.getWebContext(); - const project = webContext.project; - const organization = webContext.account.name; - const projectId = project.id; - // convert project.name to url encoding - const projectName = project.name.replace(/ /g, "%20").replace(/&/g, "%26"); - - consoleLog('project id: ' + projectId); - consoleLog('project name: ' + projectName); - consoleLog('organization name: ' + organization); - } - catch (err) { - consoleLog(`Error getting the web context: ${err}`); - } + const webContext = VSS.getWebContext(); + const project = webContext.project; + const organization = webContext.account.name; + const projectId = project.id; + // convert project.name to url encoding + const projectName = project.name.replace(/ /g, "%20").replace(/&/g, "%26"); + + consoleLog('project id: ' + projectId); + consoleLog('project name: ' + projectName); + consoleLog('organization name: ' + organization); async function loadWidget(widgetSettings) { consoleLog(`WidgetSettings inside loadWidget_1x1: ${JSON.stringify(widgetSettings)}`);