Skip to content

Commit c41f324

Browse files
committed
Only let the infinite handler fetch more results if the limit is hit
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 3dbe549 commit c41f324

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/settings/src/store/users.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ const actions = {
220220
.then((response) => {
221221
if (Object.keys(response.data.ocs.data.users).length > 0) {
222222
context.commit('appendUsers', response.data.ocs.data.users)
223-
return true
223+
return Object.keys(response.data.ocs.data.users).length === limit
224224
}
225225
return false
226226
})
@@ -237,7 +237,7 @@ const actions = {
237237
.then((response) => {
238238
if (Object.keys(response.data.ocs.data.users).length > 0) {
239239
context.commit('appendUsers', response.data.ocs.data.users)
240-
return true
240+
return Object.keys(response.data.ocs.data.users).length === limit
241241
}
242242
return false
243243
})

0 commit comments

Comments
 (0)