File tree Expand file tree Collapse file tree
components/FrontDoor/Controls Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,7 +324,10 @@ export const ConversationItem: React.FC<ConversationItemProps> = (props) => {
324324
325325 const sortedParticipantsByOwnerMeOthers = React . useMemo ( ( ) => {
326326 const participants : ConversationParticipant [ ] = [ ] ;
327- participants . push ( getOwnerParticipant ( conversation ) ) ;
327+ const owner = getOwnerParticipant ( conversation ) ;
328+ if ( owner ) {
329+ participants . push ( owner ) ;
330+ }
328331 if ( wasSharedWithMe ( conversation ) ) {
329332 const me = conversation . participants . find ( ( participant ) => participant . id === localUserId ) ;
330333 if ( me ) {
Original file line number Diff line number Diff line change @@ -53,11 +53,7 @@ export const useConversationUtility = () => {
5353 //
5454
5555 const getOwnerParticipant = React . useCallback ( ( conversation : Conversation ) => {
56- const owner = conversation . participants . find ( ( participant ) => participant . id === conversation . ownerId ) ;
57- if ( ! owner ) {
58- throw new Error ( 'Owner not found in conversation participants' ) ;
59- }
60- return owner ;
56+ return conversation . participants . find ( ( participant ) => participant . id === conversation . ownerId ) ;
6157 } , [ ] ) ;
6258
6359 const wasSharedWithMe = React . useCallback (
You can’t perform that action at this time.
0 commit comments