Skip to content

Commit

Permalink
auth: Remove if statement (#1861)
Browse files Browse the repository at this point in the history
* remove if

* bump version
  • Loading branch information
motm32 authored Dec 19, 2024
1 parent c445e69 commit 64f08cd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 4 additions & 0 deletions auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 4.0.2 - 2024-12-19

* [#1861](https://github.com/microsoft/vscode-azuretools/pull/1861) Remove unecessary if statement

## 4.0.1 - 2024-12-17

* [#1856](https://github.com/microsoft/vscode-azuretools/pull/1856) Fix tenantId undefined error
Expand Down
4 changes: 2 additions & 2 deletions auth/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@microsoft/vscode-azext-azureauth",
"author": "Microsoft Corporation",
"version": "4.0.1",
"version": "4.0.2",
"description": "Azure authentication helpers for Visual Studio Code",
"tags": [
"azure",
Expand Down
7 changes: 2 additions & 5 deletions auth/src/utils/getUnauthenticatedTenants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ export async function getUnauthenticatedTenants(subscriptionProvider: AzureSubsc
const tenants = await subscriptionProvider.getTenants();
const unauthenticatedTenants: TenantIdDescription[] = [];
for await (const tenant of tenants) {
// Occasiounally users have run into one of their tenants being undefined https://github.com/microsoft/vscode-azureresourcegroups/issues/966
if (tenant) {
if (!await subscriptionProvider.isSignedIn(tenant.tenantId, tenant.account)) {
unauthenticatedTenants.push(tenant);
}
if (!await subscriptionProvider.isSignedIn(tenant.tenantId, tenant.account)) {
unauthenticatedTenants.push(tenant);
}
}

Expand Down

0 comments on commit 64f08cd

Please sign in to comment.