mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 08:00:24 +08:00
Remove unnecessary nonnull assertions
This commit is contained in:
parent
2a7183b0a4
commit
11a72f8450
|
@ -222,7 +222,7 @@ export default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = I
|
|||
record.relationships.discussion.data.id === discussionId
|
||||
)
|
||||
.map((record) => app.store.getById<Post>('posts', record.id))
|
||||
.sort((a?: Post, b?: Post) => a?.createdAt()?.getTime()! - b?.createdAt()?.getTime()!)
|
||||
.sort((a?: Post, b?: Post) => (a?.createdAt()?.getTime() ?? 0) - (b?.createdAt()?.getTime() ?? 0))
|
||||
.slice(0, 20);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user