discard stale search results

This commit is contained in:
Matthew Hodgson 2015-12-11 03:22:44 +00:00
parent af3c43ca76
commit 3b245f0131

View file

@ -459,6 +459,12 @@ module.exports = React.createClass({
}
}
}).then(function(data) {
if (!self.state.searching || term !== self.refs.search_bar.refs.search_term.value) {
console.error("Discarding stale search results");
return;
}
// for debugging:
// data.search_categories.room_events.highlights = ["hello", "everybody"];