diff --git a/app/components/channel_list/categories/body/channel/index.ts b/app/components/channel_list/categories/body/channel/index.ts index 4848591990..4aeca82c5f 100644 --- a/app/components/channel_list/categories/body/channel/index.ts +++ b/app/components/channel_list/categories/body/channel/index.ts @@ -14,7 +14,6 @@ import {getUserIdFromChannelName} from '@utils/user'; import ChannelListItem from './channel_list_item'; import type {WithDatabaseArgs} from '@typings/database/database'; -import type ChannelModel from '@typings/database/models/servers/channel'; const enhance = withObservables(['channelId'], ({channelId, database}: {channelId: string} & WithDatabaseArgs) => { const myChannel = observeMyChannel(database, channelId); @@ -40,12 +39,12 @@ const enhance = withObservables(['channelId'], ({channelId, database}: {channelI ), myChannel, channel: channel.pipe( - switchMap((c: ChannelModel) => of$({ - deleteAt: c.deleteAt, - displayName: c.displayName, - name: c.name, - shared: c.shared, - type: c.type, + switchMap((c) => of$({ + deleteAt: c?.deleteAt || 0, + displayName: c?.displayName || '', + name: c?.name || '', + shared: c?.shared || false, + type: c?.type || '', })), ), };