mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 20:38:55 +03:00
discard stale search results
This commit is contained in:
parent
af3c43ca76
commit
3b245f0131
1 changed files with 6 additions and 0 deletions
|
@ -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"];
|
||||
|
||||
|
|
Loading…
Reference in a new issue