Skip to content

Commit

Permalink
call debounce only when it's required
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-atg committed Aug 21, 2021
1 parent bdcafa3 commit 2a4effa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ class ReportActionCompose extends React.Component {
});
this.comment = newComment;
this.debouncedSaveReportComment(newComment);
this.debouncedBroadcastUserIsTyping();
if (newComment) {
this.debouncedBroadcastUserIsTyping();
}
}

/**
Expand Down

0 comments on commit 2a4effa

Please sign in to comment.