From bedd97f37cef89b38665ac73ad992c029055ed7e Mon Sep 17 00:00:00 2001 From: Michael Kimberlin Date: Tue, 5 Nov 2024 12:57:29 -0600 Subject: [PATCH] Avoided undefined document --- web-ui/src/context/AppContext.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-ui/src/context/AppContext.jsx b/web-ui/src/context/AppContext.jsx index 45c213d322..0bd2819d0b 100644 --- a/web-ui/src/context/AppContext.jsx +++ b/web-ui/src/context/AppContext.jsx @@ -35,7 +35,7 @@ import {getCertifications} from "../api/certification.js"; const AppContext = React.createContext(); function getSessionCookieValue(name) { - const cookies = document.cookie.split(';'); + const cookies = document?.cookie?.split(';'); for (let i = 0; i < cookies.length; i++) { const cookie = cookies[i].trim(); if (cookie.startsWith(name + '=')) {