From cbb62f4a717c92c3b4a6052d2ad86efb6635784a Mon Sep 17 00:00:00 2001 From: Mikunj Date: Thu, 20 Dec 2018 15:30:19 +1100 Subject: [PATCH] Added tsx files to grunt watch. Fixed minor bug in conversation view. --- Gruntfile.js | 2 +- js/views/conversation_view.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index ef846a585..6db32d085 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -176,7 +176,7 @@ module.exports = grunt => { tasks: ['sass'], }, transpile: { - files: ['./ts/**/*.ts'], + files: ['./ts/**/*.ts','./ts/**/*.tsx'], tasks: ['exec:transpile'], }, }, diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index 03e487a16..ecbc57969 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -1520,7 +1520,7 @@ const colons = `:${emojiData[e.index].short_name}:`; const textarea = this.$messageField[0]; - if (textarea.selectionStart || textarea.selectionStart === '0') { + if (textarea.selectionStart || textarea.selectionStart === 0) { const startPos = textarea.selectionStart; const endPos = textarea.selectionEnd;