A platform for community discussion. Free, open, simple.
REFACTOR: removes useless conditional (#9668)
Joffrey JAFFEUX864f48b2e696
diff --git a/app/assets/javascripts/pretty-text/emoji.js b/app/assets/javascripts/pretty-text/emoji.jsindex a2963b84e1a..74af3b90cdc 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 ||