Fix JS error when hovering over reactions (#6710)

* Fix JS error when hovering over reactions

* Fix autocomplete for custom emojis

* Update to latest mattermost-redux
Этот коммит содержится в:
Joram Wilander
2017-06-21 10:38:19 -04:00
коммит произвёл GitHub
родитель f80003a975
Коммит 6bfb7ea3a9
3 изменённых файлов: 19 добавлений и 4 удалений

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

@@ -3,12 +3,15 @@
import React from 'react';
import EmojiStore from 'stores/emoji_store.jsx';
import {default as EmojiStore, EmojiMap} from 'stores/emoji_store.jsx';
import * as Emoticons from 'utils/emoticons.jsx';
import SuggestionStore from 'stores/suggestion_store.jsx';
import Suggestion from './suggestion.jsx';
import store from 'stores/redux_store.jsx';
import {getCustomEmojisByName} from 'mattermost-redux/selectors/entities/emojis';
const MIN_EMOTICON_LENGTH = 2;
class EmoticonSuggestion extends Suggestion {
@@ -71,8 +74,10 @@ export default class EmoticonProvider {
}
}
const emojis = new EmojiMap(getCustomEmojisByName(store.getState()));
// check for named emoji
for (const [name, emoji] of EmojiStore.getEmojis()) {
for (const [name, emoji] of emojis) {
if (emoji.aliases) {
// This is a system emoji so it may have multiple names
for (const alias of emoji.aliases) {