From 5a275209ccc441818824f885ed716bece6d4b1f3 Mon Sep 17 00:00:00 2001 From: Alan Ren Date: Thu, 9 Jul 2020 13:58:07 -0700 Subject: [PATCH] fix account dropdown list issue (#11266) * fix the empty account list issue * remove comments --- extensions/resource-deployment/src/ui/modelViewUtils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/resource-deployment/src/ui/modelViewUtils.ts b/extensions/resource-deployment/src/ui/modelViewUtils.ts index 35af2b670d..e17b7dbedf 100644 --- a/extensions/resource-deployment/src/ui/modelViewUtils.ts +++ b/extensions/resource-deployment/src/ui/modelViewUtils.ts @@ -802,7 +802,11 @@ async function processAzureAccountField(context: AzureAccountFieldContext): Prom await vscode.commands.executeCommand('workbench.actions.modal.linkedAccount'); await populateAzureAccounts(); })); - await populateAzureAccounts(); + + // populate the values in a different batch as the initialization to avoid the issue that the account list is empty even though the values are correctly. + setTimeout(async () => { + await populateAzureAccounts(); + }, 0); } function createAzureAccountDropdown(context: AzureAccountFieldContext): AzureAccountComponents {