Merge pull request #2141 from rgarmsen2295/fix-search-map-error

RC2 - Fix issue with searching for short strings
Этот коммит содержится в:
Christopher Speller
2016-02-11 08:07:22 -05:00
родитель 843d83c872 e322774d74
Коммит 8291fdd681

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

@@ -15,13 +15,16 @@ function getStateFromStores() {
const results = SearchStore.getSearchResults();
const channels = new Map();
const channelIds = results.order.map((postId) => results.posts[postId].channel_id);
for (const id of channelIds) {
if (channels.has(id)) {
continue;
}
channels.set(id, ChannelStore.get(id));
if (results && results.order) {
const channelIds = results.order.map((postId) => results.posts[postId].channel_id);
for (const id of channelIds) {
if (channels.has(id)) {
continue;
}
channels.set(id, ChannelStore.get(id));
}
}
return {