From c6ea1961883b6f553a4a9f7dc6231cdcf40210cb Mon Sep 17 00:00:00 2001 From: Dylan Ravel Date: Mon, 16 Dec 2024 10:31:56 -0700 Subject: [PATCH] Added check to make sure a pull request exists --- app/src/ui/toolbar/branch-dropdown.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/ui/toolbar/branch-dropdown.tsx b/app/src/ui/toolbar/branch-dropdown.tsx index c6885714c7f..7ad501d08b2 100644 --- a/app/src/ui/toolbar/branch-dropdown.tsx +++ b/app/src/ui/toolbar/branch-dropdown.tsx @@ -309,7 +309,9 @@ export class BranchDropdown extends React.Component { name: tip.branch.name, isLocal: tip.branch.type === BranchType.Local, onRenameBranch: this.onRenameBranch, - onViewPullRequestOnGitHub: this.onViewPullRequestOnGithub, + onViewPullRequestOnGitHub: this.props.currentPullRequest + ? this.onViewPullRequestOnGithub + : undefined, onDeleteBranch: this.onDeleteBranch, })