Skip to content

Commit

Permalink
make fix the bug on the first time
Browse files Browse the repository at this point in the history
  • Loading branch information
itamarshubin committed Feb 2, 2024
1 parent 0d79871 commit 8ce58d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/firebase/shabbas-manage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const getAlcoholics = async (msg: Message) => {
const userRef = await getUserRef(msg);

const subscribedYears: string[] = userRef.get("subscribedYears");
if (subscribedYears.length === 0) resetSubscribedYears(msg, userRef);
if (subscribedYears.length === 0) await resetSubscribedYears(msg, userRef);
const alcoholic: DocumentReference<DocumentData>[] =
shabbas.data().alcoholics;
if (!alcoholic) {
Expand Down Expand Up @@ -157,7 +157,7 @@ export const getParticipants = async (msg: Message) => {
const userRef = await getUserRef(msg);

const subscribedYears: string[] = userRef.get("subscribedYears");
if (subscribedYears.length === 0) resetSubscribedYears(msg, userRef);
if (subscribedYears.length === 0) await resetSubscribedYears(msg, userRef);


const participant: DocumentReference<DocumentData>[] =
Expand Down

0 comments on commit 8ce58d6

Please sign in to comment.