diff --git a/frontend/src/ts/popups/quote-search-popup.ts b/frontend/src/ts/popups/quote-search-popup.ts index 271bc1f6c..fc9f434e8 100644 --- a/frontend/src/ts/popups/quote-search-popup.ts +++ b/frontend/src/ts/popups/quote-search-popup.ts @@ -108,7 +108,7 @@ function buildQuoteSearchResult( lengthDesc = "thicc"; } - const loggedOut = !Auth.currentUser; + const loggedOut = !Auth?.currentUser; const isFav = !loggedOut && QuotesController.isQuoteFavorite(quote); return ` @@ -193,7 +193,7 @@ export async function show(clearText = true): Promise { const quoteSearchInputValue = $("#quoteSearchPopup input").val() as string; - if (!Auth.currentUser) { + if (!Auth?.currentUser) { $("#quoteSearchPopup #gotoSubmitQuoteButton").addClass("hidden"); $("#quoteSearchPopup #toggleShowFavorites").addClass("hidden"); } else { @@ -385,7 +385,7 @@ $(document).on("click", "#quoteSearchPopup .textButton.favorite", async (e) => { }); $(document).on("click", "#toggleShowFavorites", (e) => { - if (!Auth.currentUser) { + if (!Auth?.currentUser) { // Notifications.add("You need to be logged in to use this feature!", 0); return; }