diff --git a/src/popup/components/Content.tsx b/src/popup/components/Content.tsx index 574bc31..9b36be8 100644 --- a/src/popup/components/Content.tsx +++ b/src/popup/components/Content.tsx @@ -67,7 +67,7 @@ export const Content = (props: Props) => { let mergeRequestsToDisplay = mrToDisplayByTabId[currentTab] ?? mrData.mrReceived; if (currentTab === 'to_review' && !draftInToReviewTab) { - mergeRequestsToDisplay = mergeRequestsToDisplay.filter((mr) => !mr.work_in_progress); + mergeRequestsToDisplay = mergeRequestsToDisplay?.filter((mr) => !mr.work_in_progress); } return ; diff --git a/src/popup/components/MergeRequestItem.tsx b/src/popup/components/MergeRequestItem.tsx index 42f185c..49e9b21 100644 --- a/src/popup/components/MergeRequestItem.tsx +++ b/src/popup/components/MergeRequestItem.tsx @@ -36,7 +36,7 @@ export const MergeRequestItem = ({ mr }: Props) => { approved: mr.approvals && mr.approvals.approved_by && - mr.approvals.approved_by.filter((approval) => { + mr.approvals.approved_by?.filter((approval) => { return approval.user.id === assignee.id; }).length > 0 } as UserWithApproval;