fix: translation prop checking (#5369)

* fix translation checks

* wip
This commit is contained in:
Gleidson Daniel Silva 2023-11-29 15:30:15 -03:00 committed by GitHub
parent af83fc236f
commit 2989b3c2ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -389,7 +389,7 @@ class MessageContainer extends React.Component<IMessageContainerProps, IMessageC
let message = msg;
let isTranslated = false;
const otherUserMessage = u.username !== user.username;
const otherUserMessage = u?.username !== user?.username;
// "autoTranslateRoom" and "autoTranslateLanguage" are properties from the subscription
// "autoTranslateMessage" is a toggle between "View Original" and "Translate" state
if (autoTranslateRoom && autoTranslateMessage && autoTranslateLanguage && otherUserMessage) {