Skip to content

Commit 8f6712e

Browse files
author
William Stuckey
committed
Clear empty MCP registry data
1 parent d5b715a commit 8f6712e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/vs/workbench/services/accounts/browser/defaultAccount.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,12 @@ export class DefaultAccountProvider extends Disposable implements IDefaultAccoun
694694
if (policyData.mcp) {
695695
const mcpRegistryResult = await this.getMcpRegistryProvider(sessions, accountPolicyData, options);
696696
mcpRegistryDataFetchedAt = mcpRegistryResult?.fetchedAt ?? accountPolicyData?.mcpRegistryDataFetchedAt;
697-
if (mcpRegistryResult) {
698-
policyData.mcpRegistryUrl = mcpRegistryResult.data?.url;
699-
policyData.mcpAccess = mcpRegistryResult.data?.registry_access;
697+
if (mcpRegistryResult?.data) {
698+
policyData.mcpRegistryUrl = mcpRegistryResult.data.url;
699+
policyData.mcpAccess = mcpRegistryResult.data.registry_access;
700+
} else if (mcpRegistryResult) {
701+
policyData.mcpRegistryUrl = undefined;
702+
policyData.mcpAccess = undefined;
700703
}
701704
} else {
702705
policyData.mcpRegistryUrl = undefined;

0 commit comments

Comments
 (0)