mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-06-28 10:32:15 +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
|
@action
|
||||||
async triggerDiscovery() {
|
async triggerDiscovery() {
|
||||||
|
if (this.query?.length === 0) {
|
||||||
|
this.discobotDiscoveries.resetDiscovery();
|
||||||
|
this.smoothStreamer.resetStreaming();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.discobotDiscoveries.lastQuery === this.query) {
|
if (this.discobotDiscoveries.lastQuery === this.query) {
|
||||||
this.hideDiscoveries = false;
|
this.hideDiscoveries = false;
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user