flavours/glitch/reducers/compose.js: Fix toLowerCase TypeError
[Error] TypeError: e.toLowerCase is not a function. (In 'e.toLowerCase()', 'e.toLowerCase' is undefined) Some added context: https://queer.hacktivis.me/notice/9g4OfhpIWQLNoZ3mLI
This commit is contained in:
parent
9a259b1789
commit
eff782b1ec
1 changed files with 1 additions and 1 deletions
|
@ -295,7 +295,7 @@ const expiresInFromExpiresAt = expires_at => {
|
|||
const mergeLocalHashtagResults = (suggestions, prefix, tagHistory) => {
|
||||
prefix = prefix.toLowerCase();
|
||||
if (suggestions.length < 4) {
|
||||
const localTags = tagHistory.filter(tag => tag.toLowerCase().startsWith(prefix) && !suggestions.some(suggestion => suggestion.type === 'hashtag' && suggestion.name.toLowerCase() === tag.toLowerCase()));
|
||||
const localTags = tagHistory.filter(tag => tag && tag.toLowerCase().startsWith(prefix) && !suggestions.some(suggestion => suggestion.type === 'hashtag' && suggestion.name.toLowerCase() === tag.toLowerCase()));
|
||||
return suggestions.concat(localTags.slice(0, 4 - suggestions.length).toJS().map(tag => ({ type: 'hashtag', name: tag })));
|
||||
} else {
|
||||
return suggestions;
|
||||
|
|
Loading…
Reference in a new issue