TS errors

This commit is contained in:
Kegan Dougal 2023-01-20 10:31:44 +00:00
parent c685c8e856
commit 769fd4a786
5 changed files with 46 additions and 30 deletions

View file

@ -566,8 +566,8 @@ export default class RoomSublist extends React.Component<IProps, IState> {
let isUnreadFirst = RoomListStore.instance.getListOrder(this.props.tagId) === ListAlgorithm.Importance;
if (this.slidingSyncMode) {
const slidingList = SlidingSyncManager.instance.slidingSync.getListParams(this.props.tagId);
isAlphabetical = slidingList.sort[0] === "by_name";
isUnreadFirst = slidingList.sort[0] === "by_notification_level";
isAlphabetical = (slidingList?.sort || [])[0] === "by_name";
isUnreadFirst = (slidingList?.sort || [])[0] === "by_notification_level";
}
// Invites don't get some nonsense options, so only add them if we have to.