improve layout for search results, fix syntax highlighting quirks in sublime, and don't crash on zero results

This commit is contained in:
Matthew Hodgson 2015-11-29 13:32:13 +00:00
parent af6bd53d38
commit 9a64dc27fc
2 changed files with 13 additions and 13 deletions

View file

@ -502,7 +502,10 @@ module.exports = {
var EventTile = sdk.getComponent('messages.Event');
var self = this;
if (this.state.searchResults) {
if (this.state.searchResults &&
this.state.searchResults.search_categories.room_events.results &&
this.state.searchResults.search_categories.room_events.groups)
{
// XXX: this dance is foul, due to the results API not directly returning sorted results
var results = this.state.searchResults.search_categories.room_events.results;
var roomIdGroups = this.state.searchResults.search_categories.room_events.groups.room_id;