Changed mention parser to ignore empty string mentions

Этот коммит содержится в:
Harrison Healey
2016-03-14 11:23:39 -04:00
родитель 927c2dbfec
Коммит f8ac97fb22

Просмотреть файл

@@ -213,6 +213,11 @@ function highlightCurrentMentions(text, tokens) {
}
for (const mention of UserStore.getCurrentMentionKeys()) {
// occasionally we get an empty mention which matches a bunch of empty strings
if (!mention) {
continue;
}
output = output.replace(new RegExp(`(^|\\W)(${escapeRegex(mention)})\\b`, 'gi'), replaceCurrentMentionWithToken);
}