Skip to content

Commit e081ad8

Browse files
committed
use always default url when cannot be switched
1 parent f481447 commit e081ad8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/vs/platform/userDataSync/common/userDataSyncStoreService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ export abstract class AbstractUserDataSyncStoreManagementService extends Disposa
6565
&& Object.keys(value.authenticationProviders).every(authenticationProviderId => isArray(value!.authenticationProviders![authenticationProviderId].scopes))
6666
) {
6767
const syncStore = value as ConfigurationSyncStore;
68-
const type: UserDataSyncStoreType | undefined = this.storageService.get(SYNC_SERVICE_URL_TYPE, StorageScope.GLOBAL) as UserDataSyncStoreType | undefined;
68+
const canSwitch = !!syncStore.canSwitch && !configuredStore?.url;
69+
const type: UserDataSyncStoreType | undefined = canSwitch ? this.storageService.get(SYNC_SERVICE_URL_TYPE, StorageScope.GLOBAL) as UserDataSyncStoreType : undefined;
6970
const url = configuredStore?.url
7071
|| type === 'insiders' ? syncStore.insidersUrl
7172
: type === 'stable' ? syncStore.stableUrl

0 commit comments

Comments
 (0)