Skip to content

A platform for community discussion. Free, open, simple.

FIX: the empty state message was appearing in wrong moments on the user bookmarks stage (#14127)

Andrei Prigorshnev4d5f5a67c112
diff --git a/app/assets/javascripts/discourse/app/controllers/user-activity-bookmarks.js b/app/assets/javascripts/discourse/app/controllers/user-activity-bookmarks.js
index 8df706ef2c8..c80cfc070ad 100644
--- a/app/assets/javascripts/discourse/app/controllers/user-activity-bookmarks.js
+++ b/app/assets/javascripts/discourse/app/controllers/user-activity-bookmarks.js
@@ -25,14 +25,11 @@ export default Controller.extend({
content: [],
loading: true,
permissionDenied: false,
+ searchTerm: this.q,
});
- if (this.q && !this.searchTerm) {
- this.set("searchTerm", this.q);
- }
-
return this.model
- .loadItems({ q: this.searchTerm })
+ .loadItems({ q: this.q })
.then((response) => this._processLoadResponse(response))
.catch(() => this._bookmarksListDenied())
.finally(() => {
@@ -85,7 +82,7 @@ export default Controller.extend({
this.set("loadingMore", true);
return this.model
- .loadMore({ q: this.searchTerm })
+ .loadMore({ q: this.q })
.then((response) => this._processLoadResponse(response))
.catch(() => this._bookmarksListDenied())
.finally(() => this.set("loadingMore", false));