1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-05 15:15:49 +02:00

compare error message rather than error itself on no-commits error

This commit is contained in:
Jesse Duffield 2018-08-19 18:51:42 +10:00
parent 81b07daa01
commit c5d4024d58

View File

@ -74,7 +74,7 @@ func (gui *Gui) handleCommitSelect(g *gocui.Gui, v *gocui.View) error {
}
commit, err := gui.getSelectedCommit(g)
if err != nil {
if err != errors.New(gui.Tr.SLocalize("NoCommitsThisBranch")) {
if err.Error() != gui.Tr.SLocalize("NoCommitsThisBranch") {
return err
}
return gui.renderString(g, "main", gui.Tr.SLocalize("NoCommitsThisBranch"))