From b85aa403cc18c9ee18cffb774f71ebc70c5de521 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Sun, 21 Nov 2021 19:54:37 -0500 Subject: [PATCH] Remove unnecessary nonnull assertions --- js/src/forum/components/DiscussionPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/forum/components/DiscussionPage.tsx b/js/src/forum/components/DiscussionPage.tsx index 6ae4b1d94..0e99a517c 100644 --- a/js/src/forum/components/DiscussionPage.tsx +++ b/js/src/forum/components/DiscussionPage.tsx @@ -222,7 +222,7 @@ export default class DiscussionPage app.store.getById('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); }