mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-02-16 08:24:45 +00:00
DEV: Prevent HyDE search from being called multiple times (#422)
This commit is contained in:
parent
04eae76f68
commit
1748ebcb8c
@ -124,7 +124,7 @@ export default class SemanticSearch extends Component {
|
||||
this.preventAISearch = false;
|
||||
}
|
||||
|
||||
if (this.initialSearchTerm) {
|
||||
if (this.initialSearchTerm && !this.searching) {
|
||||
return this.performHyDESearch();
|
||||
}
|
||||
|
||||
@ -132,7 +132,9 @@ export default class SemanticSearch extends Component {
|
||||
|
||||
withPluginApi("1.15.0", (api) => {
|
||||
api.onAppEvent("full-page-search:trigger-search", () => {
|
||||
return this.performHyDESearch();
|
||||
if (!this.searching) {
|
||||
return this.performHyDESearch();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user