1
0
mirror of https://github.com/flarum/core.git synced 2025-07-17 14:51:19 +02:00

Use calculated offset when loading page in PaginatedListState (#3159)

This commit is contained in:
Alexander Skvortsov
2021-11-08 16:33:07 -05:00
committed by GitHub
parent 46def26c9f
commit ec97c45d96

View File

@@ -93,8 +93,8 @@ export default abstract class PaginatedListState<T extends Model> {
protected loadPage(page = 1): Promise<T[]> {
const params = this.requestParams();
params.page = {
offset: this.pageSize * (page - 1),
...params.page,
offset: this.pageSize * (page - 1),
};
if (Array.isArray(params.include)) {