mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-06-26 09:32:40 +00:00
FIX: Discovery shouldn't re-trigger when no search (#1255)
This update fixes an issue where discobot discoveries was re-triggering when search menu was opened with no query present.
This commit is contained in:
parent
ef08e5ea45
commit
0024f2d264
@ -186,6 +186,12 @@ export default class AiSearchDiscoveries extends Component {
|
||||
|
||||
@action
|
||||
async triggerDiscovery() {
|
||||
if (this.query?.length === 0) {
|
||||
this.discobotDiscoveries.resetDiscovery();
|
||||
this.smoothStreamer.resetStreaming();
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.discobotDiscoveries.lastQuery === this.query) {
|
||||
this.hideDiscoveries = false;
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user