Skip to content

Commit

Permalink
auto sync only when there is user data
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Sep 3, 2019
1 parent bc7e628 commit 8bcdb8a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ class AutoSyncUserDataContribution extends Disposable implements IWorkbenchContr
private async autoSync(): Promise<void> {
if (this.configurationService.getValue<boolean>('userData.autoSync')) {
const userIdentity = this.userIdentityService.getUserIndetities()[0];
await this.extensionService.activateByEvent(`onUserData:${userIdentity.identity}`);
this.userDataSyncService.synchronise();
if (userIdentity) {
await this.extensionService.activateByEvent(`onUserData:${userIdentity.identity}`);
this.userDataSyncService.synchronise();
}
}
}

Expand Down

0 comments on commit 8bcdb8a

Please sign in to comment.