Skip to content

Commit

Permalink
Minor improvement
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Cai <yicai@redhat.com>
  • Loading branch information
ciiay committed May 31, 2024
1 parent 251aba5 commit 1fa0c05
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/rbac/src/components/RolesList/RolesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ export const RolesList = () => {
},
];

const firstErrorWarning = errorWarningArr.find(({ message }) => message);
return firstErrorWarning || { message: '', title: '' };
return (
errorWarningArr.find(({ message }) => message) || {
message: '',
title: '',
}
);
};

const errorWarning = getErrorWarning();
Expand Down

0 comments on commit 1fa0c05

Please sign in to comment.