diff --git a/src/components/structures/RoomView.js b/src/components/structures/RoomView.js index 1dc2440913..4c2bbfa8d1 100644 --- a/src/components/structures/RoomView.js +++ b/src/components/structures/RoomView.js @@ -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"];