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

Always return something

Klaus Zandersd2ed549cce27
diff --git a/frontend/src/stimulus/controllers/dynamic/sort-by-config.controller.ts b/frontend/src/stimulus/controllers/dynamic/sort-by-config.controller.ts
index 04433d80a61..733166162b3 100644
--- a/frontend/src/stimulus/controllers/dynamic/sort-by-config.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/sort-by-config.controller.ts
@@ -52,9 +52,8 @@ export default class SortByConfigController extends Controller {
buildSortJson():string {
const filters = this.inputRowTargets.map((row) => {
const field = this.getSelectedField(row);
- if (field) {
- return [field, this.getSelectedDirection(row)];
- }
+ if (field) { return [field, this.getSelectedDirection(row)]; }
+ return null;
});
return JSON.stringify(compact(filters));