Skip to content

Commit

Permalink
fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
itamarshubin committed Jul 22, 2024
1 parent d9b0a75 commit 97a26a8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/firebase/shabbas-manage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const getShabbasDoc = async (): Promise<

export const getUserRef = async (
msg: Message
): Promise<QueryDocumentSnapshot<DocumentData, DocumentData> | undefined> => {
): Promise<QueryDocumentSnapshot | undefined> => {
const userRef = (
await getDocs(
query(collection(fireStore, "/users"), where("phone", "==", msg.from))
Expand Down Expand Up @@ -114,7 +114,6 @@ export const getAlcoholics = async (msg: Message) => {
const userRef = await getUserRef(msg);
if (!userRef) return client.sendMessage(msg.from, "אתה לא רשום במערכת");


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

0 comments on commit 97a26a8

Please sign in to comment.