Skip to content

Commit

Permalink
Avoided undefined document
Browse files Browse the repository at this point in the history
  • Loading branch information
mkimberlin committed Nov 5, 2024
1 parent 4e1f1ff commit e8091fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web-ui/src/context/AppContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 + '=')) {
Expand Down

0 comments on commit e8091fd

Please sign in to comment.