REFACTOR: removes useless conditional (#9668)

REFACTOR: removes useless conditional (#9668)

Given we will return true on the line before if inlineEmoji, this will always be false.

diff --git a/app/assets/javascripts/pretty-text/emoji.js b/app/assets/javascripts/pretty-text/emoji.js
index a2963b8..74af3b9 100644
--- a/app/assets/javascripts/pretty-text/emoji.js
+++ b/app/assets/javascripts/pretty-text/emoji.js
@@ -82,7 +82,7 @@ function isReplacableInlineEmoji(string, index, inlineEmoji) {
 
   // index depends on regex; when `inlineEmoji` is false, the regex starts
   // with a `\B` character, so there's no need to subtract from the index
-  const beforeEmoji = string.slice(0, index - (inlineEmoji ? 1 : 0));
+  const beforeEmoji = string.slice(0, index);
 
   return (
     beforeEmoji.length === 0 ||

GitHub sha: 864f48b2

This commit appears in #9668 which was approved by eviltrout. It was merged by jjaffeux.