Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 3586304

Browse files
Using string.Equals instead
1 parent 896384c commit 3586304

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GitHub.App/Services/PullRequestService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ public IObservable<bool> EnsureLocalBranchesAreMarkedAsPullRequests(ILocalReposi
524524

525525
public bool IsPullRequestFromRepository(ILocalRepositoryModel repository, PullRequestDetailModel pullRequest)
526526
{
527-
return pullRequest.HeadRepositoryOwner.ToLowerInvariant() == repository.CloneUrl.Owner.ToLowerInvariant();
527+
return string.Equals(repository?.CloneUrl.Owner, pullRequest.HeadRepositoryOwner, StringComparison.OrdinalIgnoreCase);
528528
}
529529

530530
public IObservable<Unit> SwitchToBranch(ILocalRepositoryModel repository, PullRequestDetailModel pullRequest)

0 commit comments

Comments
 (0)