Skip to content

Commit e8091fd

Browse files
committed
Avoided undefined document
1 parent 4e1f1ff commit e8091fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web-ui/src/context/AppContext.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import {getCertifications} from "../api/certification.js";
3535
const AppContext = React.createContext();
3636

3737
function getSessionCookieValue(name) {
38-
const cookies = document.cookie.split(';');
38+
const cookies = document?.cookie?.split(';');
3939
for (let i = 0; i < cookies.length; i++) {
4040
const cookie = cookies[i].trim();
4141
if (cookie.startsWith(name + '=')) {

0 commit comments

Comments
 (0)