diff --git a/js/src/forum/extenders/addFrontSort.ts b/js/src/forum/extenders/addFrontSort.ts index ae155bd..d27166f 100644 --- a/js/src/forum/extenders/addFrontSort.ts +++ b/js/src/forum/extenders/addFrontSort.ts @@ -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) { @@ -14,7 +15,7 @@ export default function () { } }); - extend(DiscussionListState.prototype, 'sortMap', function (map: Record) { + extend(DiscussionListState.prototype, 'sortMap', function (map: SortMap) { map.front = '-frontdate'; }); }