From 994d8708f2e62f944aec46d2c7890cb23072170a Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 7 Jul 2020 06:52:44 -0600 Subject: [PATCH] Move to a fragment --- src/components/views/rooms/RoomSublist2.tsx | 52 ++++++++++----------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/src/components/views/rooms/RoomSublist2.tsx b/src/components/views/rooms/RoomSublist2.tsx index f5a1b67571..ca798d12f1 100644 --- a/src/components/views/rooms/RoomSublist2.tsx +++ b/src/components/views/rooms/RoomSublist2.tsx @@ -315,34 +315,32 @@ export default class RoomSublist2 extends React.Component { const isAlphabetical = RoomListStore.instance.getTagSorting(this.props.tagId) === SortAlgorithm.Alphabetic; const isUnreadFirst = RoomListStore.instance.getListOrder(this.props.tagId) === ListAlgorithm.Importance; - // Invites don't get some nonsense options, so only add them if we have to. We do - // this with an array instead of a containing div to ensure that the DOM structure - // is relatively sane. - let otherSections = []; + // Invites don't get some nonsense options, so only add them if we have to. + let otherSections = null; if (this.props.tagId !== DefaultTagID.Invite) { - otherSections.push(
); - otherSections.push( -
-
{_t("Unread rooms")}
- - {_t("Always show first")} - -
, - ); - otherSections.push(
); - otherSections.push( -
-
{_t("Show")}
- - {_t("Message preview")} - -
, + otherSections = ( + +
+
+
{_t("Unread rooms")}
+ + {_t("Always show first")} + +
+
+
+
{_t("Show")}
+ + {_t("Message preview")} + +
+
); }