mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-23 08:28:10 +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);
|
localStorage.removeItem(oidcTokenKey);
|
||||||
setIsUserAuthenticated(false);
|
setIsUserAuthenticated(false);
|
||||||
setLoadingIndicator(false);
|
setLoadingIndicator(false);
|
||||||
|
clearTimeout(timeoutId);
|
||||||
if (forceLogout) {
|
if (forceLogout) {
|
||||||
onLogoutHandler();
|
onLogoutHandler();
|
||||||
} else {
|
} else {
|
||||||
|
@ -43,7 +43,7 @@ const Emoji = ({ reaction, reactionList, onReactionSelect }) => {
|
|||||||
|
|
||||||
// check if current user has reacted with emoji
|
// check if current user has reacted with emoji
|
||||||
const isReacted = reactionList.some(
|
const isReacted = reactionList.some(
|
||||||
(reactionItem) => reactionItem.user.id === currentUser.id
|
(reactionItem) => reactionItem.user.id === currentUser?.id
|
||||||
);
|
);
|
||||||
|
|
||||||
const reactedUserList = reactionList.map(
|
const reactedUserList = reactionList.map(
|
||||||
|
@ -51,7 +51,7 @@ const Reactions = ({ reactions, onReactionSelect }) => {
|
|||||||
const isReacted = (reactionType) => {
|
const isReacted = (reactionType) => {
|
||||||
return reactions.some(
|
return reactions.some(
|
||||||
(reactionItem) =>
|
(reactionItem) =>
|
||||||
reactionItem.user.id === currentUser.id &&
|
reactionItem.user.id === currentUser?.id &&
|
||||||
reactionType === reactionItem.reactionType
|
reactionType === reactionItem.reactionType
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user