Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix access to unset pagination object

Oliver Günthera5c21000c2ca
diff --git a/frontend/src/app/components/table-pagination/pagination-service.ts b/frontend/src/app/components/table-pagination/pagination-service.ts
index a8442c01e74..c0b32691e5a 100644
--- a/frontend/src/app/components/table-pagination/pagination-service.ts
+++ b/frontend/src/app/components/table-pagination/pagination-service.ts
@@ -86,11 +86,11 @@ export class PaginationService {
}
public getMaxVisiblePageOptions() {
- return this.paginationOptions.maxVisiblePageOptions;
+ return _.get(this.paginationOptions, 'maxVisiblePageOptions', DEFAULT_PAGINATION_OPTIONS.maxVisiblePageOptions);
}
public getOptionsTruncationSize() {
- return this.paginationOptions.optionsTruncationSize;
+ return _.get(this.paginationOptions, 'optionsTruncationSize', DEFAULT_PAGINATION_OPTIONS.optionsTruncationSize);
}
public setPerPage(perPage:number) {