Skip to content

Commit

Permalink
[Enhancement #505] Always use formatMessage in ErrorLogViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaskabc authored and ledsoft committed Sep 16, 2024
1 parent 74cf780 commit 6732ecc
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/component/audit/ErrorLogViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,9 @@ const ErrorLogViewer: React.FC = () => {
{errors.map((item) => {
let error = item.error;
if (error.messageId) {
if (error.values && Object.keys(error.values).length > 0) {
error = Object.assign({}, error, {
message: formatMessage(error.messageId, error.values),
});
} else {
error = Object.assign({}, error, {
message: i18n(error.messageId),
});
}
error = Object.assign({}, error, {
message: formatMessage(error.messageId, error.values),
});
}
return (
<tr key={item.timestamp}>
Expand Down

0 comments on commit 6732ecc

Please sign in to comment.