mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 19:29:51 +00:00
FIX: Prevent group requests from loading infinitely (#28544)
In GroupRequestsController, request_count is incorrectly written as user_count, which causes group member requests to be loaded infinitely when user_count is greater than request_count.
This commit is contained in:
parent
3eb7aa866c
commit
a2dbade55d
@ -16,7 +16,9 @@ export default class GroupRequestsController extends Controller {
|
|||||||
loading = false;
|
loading = false;
|
||||||
|
|
||||||
get canLoadMore() {
|
get canLoadMore() {
|
||||||
return this.get("model.requesters")?.length < this.get("model.user_count");
|
return (
|
||||||
|
this.get("model.requesters")?.length < this.get("model.request_count")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@observes("filterInput")
|
@observes("filterInput")
|
||||||
|
@ -19,7 +19,7 @@ acceptance("Group Requests", function (needs) {
|
|||||||
id: 42,
|
id: 42,
|
||||||
automatic: false,
|
automatic: false,
|
||||||
name: "Macdonald",
|
name: "Macdonald",
|
||||||
user_count: 1,
|
user_count: 10,
|
||||||
mentionable_level: 0,
|
mentionable_level: 0,
|
||||||
messageable_level: 0,
|
messageable_level: 0,
|
||||||
visibility_level: 0,
|
visibility_level: 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user