From 957182bf5596a2d1ae56d918afcc4dc81c6c191a Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Thu, 30 May 2019 14:19:26 -0300 Subject: [PATCH] [FIX] App crash with backspace on input message (#906) * Fix - App crash with backspace on input message * Improving code to fix backspace bug * Fix destructuring undefined * Improvement code to fix backspace bug --- app/containers/MessageBox/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/containers/MessageBox/index.js b/app/containers/MessageBox/index.js index 810988f61..9ebf458a7 100644 --- a/app/containers/MessageBox/index.js +++ b/app/containers/MessageBox/index.js @@ -188,7 +188,7 @@ class MessageBox extends Component { this.handleTyping(!isTextEmpty); this.setInput(text); - if (this.component) { + if (!isTextEmpty) { const { start, end } = this.component._lastNativeSelection; const cursor = Math.max(start, end); const lastNativeText = this.component._lastNativeText;