Skip to content

Commit

Permalink
fix: error when assigend agencies is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
janrembold committed Jan 17, 2024
1 parent 4449f1e commit e899ed4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/groupChat/CreateChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export const CreateGroupChatView = (props) => {
setSelectedDuration(activeSession.item.duration);
setSelectedRepetitive(activeSession.item.repetitive);
setSelectedAgency(
activeSession.item.assignedAgencies.length > 0
activeSession.item.assignedAgencies?.length > 0
? activeSession.item.assignedAgencies[0].id
: null
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/groupChat/GroupChatInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export const GroupChatInfo = () => {
},
{
label: translate('groupChat.info.settings.agency'),
value: activeSession.item.assignedAgencies.length
value: activeSession.item?.assignedAgencies?.length
? activeSession.item.assignedAgencies[0].name
: ''
}
Expand Down

0 comments on commit e899ed4

Please sign in to comment.