Skip to content

Commit

Permalink
fix(2.0): adjust frontend typings
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideIadeluca committed Dec 18, 2024
1 parent e0ff4a3 commit ef92c0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/src/forum/extenders/addFrontSort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { extend } from 'flarum/common/extend';
import DiscussionListState from 'flarum/forum/states/DiscussionListState';

import type { PaginatedListParams } from 'flarum/common/states/PaginatedListState';
import type { SortMap } from 'flarum/common/states/PaginatedListState';

export default function () {
extend(DiscussionListState.prototype, 'requestParams', function (this: DiscussionListState, params: PaginatedListParams) {
Expand All @@ -14,7 +15,7 @@ export default function () {
}
});

extend(DiscussionListState.prototype, 'sortMap', function (map: Record<string, string>) {
extend(DiscussionListState.prototype, 'sortMap', function (map: SortMap) {
map.front = '-frontdate';
});
}

0 comments on commit ef92c0d

Please sign in to comment.