diff --git a/web/src/i18n/strings.en.yaml b/web/src/i18n/strings.en.yaml index b7475093d..27e77eb1d 100644 --- a/web/src/i18n/strings.en.yaml +++ b/web/src/i18n/strings.en.yaml @@ -504,10 +504,10 @@ repoEmptyMarkdownExisting: | webhookEmpty: There are no webhooks in your repo. Click the button below to create a webhook. compareEmptyDiffTitle: There isn't anything to compare compareEmptyDiffMessage: Two branches are identical. -noCommits: There is no commits +noCommits: There are no commits noCommitsMessage: This repository does not have any commits yet. noCommitsPR: This Pull Request does not have commit history. -noChanges: There is no changes +noChanges: There are no changes noChangesPR: This Pull Request does not have any changes. noChangesCompare: Source and target are identical. pageLoading: Loading, please wait... diff --git a/web/src/pages/PullRequests/PullRequestsContentHeader/PRAuthorFilter.tsx b/web/src/pages/PullRequests/PullRequestsContentHeader/PRAuthorFilter.tsx index 2552a5b66..c075b6ecd 100644 --- a/web/src/pages/PullRequests/PullRequestsContentHeader/PRAuthorFilter.tsx +++ b/web/src/pages/PullRequests/PullRequestsContentHeader/PRAuthorFilter.tsx @@ -96,7 +96,15 @@ export function PRAuthorFilter({ } ) - const authors = [...fetchedAuthors, ...(activePullRequestAuthorObj ? [activePullRequestAuthorObj] : [])] + const authors = [...fetchedAuthors] + if (activePullRequestAuthorObj?.id) { + // Only add activePullRequestAuthorObj if it exists and isn't already in the list + const isDuplicate = fetchedAuthors.some(author => author.id === activePullRequestAuthorObj.id) + + if (!isDuplicate) { + authors.push(activePullRequestAuthorObj) + } + } const authorsList = await moveCurrentUserToTop(authors, currentUser, query) @@ -118,6 +126,7 @@ export function PRAuthorFilter({ return ( getAuthorsPromise()} disabled={loadingAuthors}