mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
REFACTOR: removes useless conditional (#9668)
Given we will return true on the line before if inlineEmoji, this will always be false.
This commit is contained in:
parent
01272f2085
commit
864f48b2e6
@ -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 ||
|
||||
|
Loading…
Reference in New Issue
Block a user