diff --git a/changelog/entries/unreleased/bug/3522_fix_bug_when_sorting_by_a_link_row_field.json b/changelog/entries/unreleased/bug/3522_fix_bug_when_sorting_by_a_link_row_field.json new file mode 100644 index 000000000..491bf6882 --- /dev/null +++ b/changelog/entries/unreleased/bug/3522_fix_bug_when_sorting_by_a_link_row_field.json @@ -0,0 +1,8 @@ +{ + "type": "bug", + "message": "Fixed a bug in which sorting by a link row field caused the frontend to crash.", + "domain": "database", + "issue_number": 3522, + "bullet_points": [], + "created_at": "2025-03-19" +} \ No newline at end of file diff --git a/web-frontend/modules/database/fieldTypes.js b/web-frontend/modules/database/fieldTypes.js index e5643cc91..a1e9e35ef 100644 --- a/web-frontend/modules/database/fieldTypes.js +++ b/web-frontend/modules/database/fieldTypes.js @@ -531,7 +531,7 @@ export class FieldType extends Registerable { getSortTypes(field) { return { [DEFAULT_SORT_TYPE_KEY]: { - function: this.getSort, + function: this.getSort.bind(this), indicator: this.getSortIndicator(field), }, }