Fix issue with searching for short strings

Этот коммит содержится в:
Reed Garmsen
2016-02-10 09:30:35 -08:00
родитель 00795908f6
Коммит e322774d74

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

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