Skip to content

Commit

Permalink
Add null check for the message count badge
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaboleken committed Jan 3, 2025
1 parent 7bb9f3a commit ff38f3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react/src/Components/Footer/Components/MessageButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function MessageButton(props) {
const {t} = useTranslation();
return (
<Badge
badgeContent={props?.numberOfUnReadMessages}
badgeContent={isNaN(props?.numberOfUnReadMessages) ? 0 : props?.numberOfUnReadMessages}
color="primary"
anchorOrigin={{
vertical: 'top',
Expand Down

0 comments on commit ff38f3f

Please sign in to comment.