Skip to content

Commit

Permalink
fix: do not attempt settings sync if not logged in (#1224)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpoy authored Jan 4, 2024
2 parents 289ed70 + 532c61f commit f9b3831
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/frontend/src/app/services/preferences.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ export class PreferencesService {
)
return;

// Do not sync remote preferences if not logged in
if (!localStorage.getItem("token")) return;
this.trpcService.trpc.users.updatePreferences.mutate(this.preferences);
}

Expand Down Expand Up @@ -151,6 +153,8 @@ export class PreferencesService {
)
return;

// Do not sync remote preferences if not logged in
if (!localStorage.getItem("token")) return;
this.trpcService.trpc.users.getPreferences
.query()
.then((remotePreferences) => {
Expand Down

0 comments on commit f9b3831

Please sign in to comment.