Skip to content

Commit a8313d4

Browse files
Check if we're passed in an extension id (#260657)
Forgot to add this check
1 parent 87eebd9 commit a8313d4

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/vs/workbench/contrib/authentication/browser/actions/manageAccountPreferencesForExtensionAction.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,20 @@ class ManageAccountPreferenceForExtensionActionImpl {
5555
) { }
5656

5757
async run(extensionId?: string, providerId?: string) {
58-
const extensions = this._extensionService.extensions
59-
.filter(ext => this._authenticationQueryService.extension(ext.identifier.value).getAllAccountPreferences().size > 0)
60-
.sort((a, b) => (a.displayName ?? a.name).localeCompare((b.displayName ?? b.name)));
61-
62-
const result = await this._quickInputService.pick(extensions.map(ext => ({
63-
label: ext.displayName ?? ext.name,
64-
id: ext.identifier.value
65-
})), {
66-
placeHolder: localize('selectExtension', "Select an extension to manage account preferences for"),
67-
title: localize('pickAProviderTitle', "Manage Extension Account Preferences")
68-
});
69-
extensionId = result?.id;
58+
if (!extensionId) {
59+
const extensions = this._extensionService.extensions
60+
.filter(ext => this._authenticationQueryService.extension(ext.identifier.value).getAllAccountPreferences().size > 0)
61+
.sort((a, b) => (a.displayName ?? a.name).localeCompare((b.displayName ?? b.name)));
62+
63+
const result = await this._quickInputService.pick(extensions.map(ext => ({
64+
label: ext.displayName ?? ext.name,
65+
id: ext.identifier.value
66+
})), {
67+
placeHolder: localize('selectExtension', "Select an extension to manage account preferences for"),
68+
title: localize('pickAProviderTitle', "Manage Extension Account Preferences")
69+
});
70+
extensionId = result?.id;
71+
}
7072
if (!extensionId) {
7173
return;
7274
}

0 commit comments

Comments
 (0)