Skip to content

Commit

Permalink
Fix bug when mergeRequestsToDisplay is not set yet (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikescops authored Jun 15, 2024
1 parent 2520d70 commit 3fa353b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/popup/components/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <MergeRequests mergeRequests={mergeRequestsToDisplay} />;
Expand Down
2 changes: 1 addition & 1 deletion src/popup/components/MergeRequestItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3fa353b

Please sign in to comment.