diff --git a/src/app/utils/tavern.ts b/src/app/utils/tavern.ts index a6e4f9eb..cb661496 100644 --- a/src/app/utils/tavern.ts +++ b/src/app/utils/tavern.ts @@ -63,7 +63,9 @@ export const submitMyTavernLocation = async (tavernId: string) => { }) } -export const getMyTavernLocation: Promise = async () => { +export const getMyTavernLocation: Promise< + TavernEventItem | null +> = async () => { // check auth const session = await getSession() if (!session) { @@ -83,6 +85,8 @@ export const getMyTavernLocation: Promise = async () => { .firstPage() .then((r) => r[0]) + if (!foundTavern) return null + return { id: foundTavern.id, city: foundTavern.get('city'),