diff options
author | Denis Palashevskii <palash.denis@outlook.com> | 2021-06-26 14:14:19 +0400 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-07-27 21:30:08 +1000 |
commit | 3802b563b03171607965b8d4771ea8f9d206553b (patch) | |
tree | 1640185bc6baaf3940752366f1a3752f59d3df74 /pkg | |
parent | d1134daa536767568a3499faf06aaef7aa9f801d (diff) |
Add error message if target branch not found with prompt
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/gui/pull_request_menu_panel.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/gui/pull_request_menu_panel.go b/pkg/gui/pull_request_menu_panel.go index 9412b71d6..b0f1ec796 100644 --- a/pkg/gui/pull_request_menu_panel.go +++ b/pkg/gui/pull_request_menu_panel.go @@ -45,6 +45,9 @@ func (gui *Gui) createPullRequestMenu(selectedBranch *models.Branch, checkedOutB findSuggestionsFunc: gui.findBranchNameSuggestions, handleConfirm: func(response string) error { targetBranch := gui.getBranchByName(response) + if targetBranch == nil { + return gui.createErrorPanel(gui.Tr.BranchNotFoundTitle) + } return createPullRequest(checkedOutBranch, targetBranch, gui) }}, ) |