Skip to content

Commit

Permalink
fix answer save error for users without authProvider (subscribers)
Browse files Browse the repository at this point in the history
  • Loading branch information
hidegmisi committed Nov 28, 2024
1 parent ecad720 commit 6708d6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/stores/electionStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export const useElectionStore = defineStore('election', {
embedName: string | undefined;
user: User | null | undefined;
}) {
if (user) {
if (user && !!user.authProvider) {
const res = await fetch('/api/answers');
const answers = await res.json();
const calculatorAnswers = answers.filter(
Expand Down

0 comments on commit 6708d6e

Please sign in to comment.