We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb8424e commit a9a8178Copy full SHA for a9a8178
src/frontend_react/src/api/config.tsx
@@ -75,7 +75,7 @@ export function getApiUrl() {
75
}
76
77
export function getUserId(): string {
78
- USER_ID = window.userInfo ? window.userInfo[0].user_id : null;
+ USER_ID = window.userInfo && window.userInfo[0] && window.userInfo[0].user_id ? window.userInfo[0].user_id : null;
79
const userId = USER_ID ?? "00000000-0000-0000-0000-000000000000";
80
return userId;
81
0 commit comments