mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-23 16:38:17 +00:00
fix(ui): app crashing on 401 error (#6287)
* fix(ui): app crashing on 401 error * add null checkes
This commit is contained in:
parent
ac4ad77e78
commit
c9be0ceff2
@ -157,6 +157,7 @@ export const AuthProvider = ({
|
||||
localStorage.removeItem(oidcTokenKey);
|
||||
setIsUserAuthenticated(false);
|
||||
setLoadingIndicator(false);
|
||||
clearTimeout(timeoutId);
|
||||
if (forceLogout) {
|
||||
onLogoutHandler();
|
||||
} else {
|
||||
|
@ -43,7 +43,7 @@ const Emoji = ({ reaction, reactionList, onReactionSelect }) => {
|
||||
|
||||
// check if current user has reacted with emoji
|
||||
const isReacted = reactionList.some(
|
||||
(reactionItem) => reactionItem.user.id === currentUser.id
|
||||
(reactionItem) => reactionItem.user.id === currentUser?.id
|
||||
);
|
||||
|
||||
const reactedUserList = reactionList.map(
|
||||
|
@ -51,7 +51,7 @@ const Reactions = ({ reactions, onReactionSelect }) => {
|
||||
const isReacted = (reactionType) => {
|
||||
return reactions.some(
|
||||
(reactionItem) =>
|
||||
reactionItem.user.id === currentUser.id &&
|
||||
reactionItem.user.id === currentUser?.id &&
|
||||
reactionType === reactionItem.reactionType
|
||||
);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user