diff --git a/frontend/src/ts/ape/adapters/axios-adapter.ts b/frontend/src/ts/ape/adapters/axios-adapter.ts index 6b34327a2..1cfe9dc03 100644 --- a/frontend/src/ts/ape/adapters/axios-adapter.ts +++ b/frontend/src/ts/ape/adapters/axios-adapter.ts @@ -18,7 +18,7 @@ type AxiosClientMethods = AxiosClientMethod & AxiosClientDataMethod; async function adaptRequestOptions( options: Ape.RequestOptions ): Promise { - const currentUser = Auth.currentUser; + const currentUser = Auth?.currentUser; const idToken = currentUser && (await getIdToken(currentUser)); return { diff --git a/frontend/src/ts/elements/alerts.ts b/frontend/src/ts/elements/alerts.ts index 1ddc49847..83bc8946f 100644 --- a/frontend/src/ts/elements/alerts.ts +++ b/frontend/src/ts/elements/alerts.ts @@ -110,7 +110,7 @@ export async function show(): Promise { "easeOutCubic" ); - if (Auth.currentUser) { + if (Auth?.currentUser) { $("#alertsPopup .accountAlerts").removeClass("hidden"); $("#alertsPopup .separator.accountSeparator").removeClass("hidden"); $("#alertsPopup .accountAlerts .list").html(` @@ -134,7 +134,7 @@ export async function show(): Promise { }, 100, () => { - if (Auth.currentUser) { + if (Auth?.currentUser) { getAccountAlerts(); } }