Fix issue with searching for short strings

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

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

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