From b0444ba4a09bbbe30916b8958406da5124c40eed Mon Sep 17 00:00:00 2001 From: Dylan Cashman Date: Fri, 4 Oct 2024 18:19:16 -0400 Subject: [PATCH] Bug fix relating to log in log out --- src/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index 8e38db307..90bc184eb 100644 --- a/src/index.js +++ b/src/index.js @@ -6,17 +6,16 @@ import { createAuth0Client } from "@auth0/auth0-spa-js"; -let toast = document.getElementById('loginToastMessage'); -if (toast) { - toast.style.display = "none"; -} const updateUI = async (auth0, query) => { const is_auth = await auth0.isAuthenticated(); //console.log("are we auth?", is_auth) if (is_auth) { document.body.style.display = null; - document.getElementById('loginToastMessage').style.display = "none"; + let toast = document.getElementById('loginToastMessage'); + if (toast) { + toast.style.display = "none"; + } // if we have a redirect request, grab it and push the user over to that page they wanted to see var queryParams = new URLSearchParams(query);