DEV: Prevent HyDE search from being called multiple times (#422)

This commit is contained in:
Keegan George 2024-01-12 11:48:07 -08:00 committed by GitHub
parent 04eae76f68
commit 1748ebcb8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -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", () => {
if (!this.searching) {
return this.performHyDESearch();
}
});
});
}