Skip to content

Commit

Permalink
add if(mounted) check
Browse files Browse the repository at this point in the history
  • Loading branch information
imtoori committed Nov 24, 2020
1 parent 7ce3e00 commit 9525db4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/src/message_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,9 @@ class MessageInputState extends State<MessageInput> {
_debounce = Timer(
const Duration(milliseconds: 350),
() {
if (!mounted) {
return;
}
final s = textEditingController.text;
StreamChannel.of(context).channel.keyStroke(
widget.parentMessage?.id,
Expand Down

0 comments on commit 9525db4

Please sign in to comment.