chore: fix React warn (dont call state on unmonted component)

This commit is contained in:
GleidsonDaniel 2024-03-27 14:31:12 -03:00
parent 8c462565de
commit 33dacbb0cd
1 changed files with 3 additions and 1 deletions

View File

@ -985,7 +985,9 @@ class RoomView extends React.Component<IRoomViewProps, IRoomViewState> {
const { rid } = this.state.room;
const { user } = this.props;
sendMessage(rid, message, this.tmid, user, tshow).then(() => {
this.setLastOpen(null);
if (this.mounted) {
this.setLastOpen(null);
}
Review.pushPositiveEvent();
});
this.resetAction();