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:
Joffrey JAFFEUX 2020-05-07 16:25:23 +02:00 committed by GitHub
parent 01272f2085
commit 864f48b2e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 ||