Skip to content

Commit

Permalink
Removed unnceccessary checks for checking if content and topic are em…
Browse files Browse the repository at this point in the history
…pty strings
  • Loading branch information
KshitizSareen committed Jan 18, 2023
1 parent e4d162c commit 833e7c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chat/ChatScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default function ChatScreen(props: Props): Node {
() => undefined,
);

if ((content !== undefined && content !== '') || (topic !== undefined && topic !== '')) {
if (content !== undefined || topic !== undefined) {
api.updateMessage(auth, editMessage.id, { content, subject: topic }).catch(error => {
showErrorAlert(_('Failed to edit message'), error.message);
});
Expand Down

0 comments on commit 833e7c4

Please sign in to comment.