strict null checks azure (#11928)

* strict null checks azure

* strict compilation

* Fix compilation issues

* Return empty arrays instead
This commit is contained in:
Amir Omidi
2020-08-25 18:12:47 -07:00
committed by GitHub
parent 8b52e7200c
commit 4659d727b7
24 changed files with 285 additions and 208 deletions

View File

@@ -23,9 +23,12 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
CommandsRegistry.registerCommand({
id: openInAzureDECommandId,
handler: (accessor, args: TreeViewItemHandleArg) => {
handler: async (accessor, args: TreeViewItemHandleArg) => {
const commandService = accessor.get(ICommandService);
return commandService.executeCommand('azure.resource.openInAzurePortal', args.$treeItem.payload);
const payload = args.$treeItem?.payload;
if (payload) {
commandService.executeCommand('azure.resource.openInAzurePortal', payload);
}
}
});