From 296d088ca295079e69a6003f6f8df4422f0beffd Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Wed, 23 Mar 2022 12:00:34 -0300 Subject: [PATCH] channel settings can be null or undefined --- app/components/channel_list/categories/body/channel/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/components/channel_list/categories/body/channel/index.ts b/app/components/channel_list/categories/body/channel/index.ts index bfc4323d48..4848591990 100644 --- a/app/components/channel_list/categories/body/channel/index.ts +++ b/app/components/channel_list/categories/body/channel/index.ts @@ -15,7 +15,6 @@ import ChannelListItem from './channel_list_item'; import type {WithDatabaseArgs} from '@typings/database/database'; import type ChannelModel from '@typings/database/models/servers/channel'; -import type MyChannelSettingsModel from '@typings/database/models/servers/my_channel_settings'; const enhance = withObservables(['channelId'], ({channelId, database}: {channelId: string} & WithDatabaseArgs) => { const myChannel = observeMyChannel(database, channelId); @@ -37,7 +36,7 @@ const enhance = withObservables(['channelId'], ({channelId, database}: {channelI return { isOwnDirectMessage, isMuted: settings.pipe( - switchMap((s: MyChannelSettingsModel) => of$(s.notifyProps?.mark_unread === 'mention')), + switchMap((s) => of$(s?.notifyProps?.mark_unread === 'mention')), ), myChannel, channel: channel.pipe(