Fixed the issue

This commit is contained in:
mjarkk 2019-07-02 10:38:36 +02:00
parent ee53d2447c
commit 28e75ebe1a
No known key found for this signature in database
GPG key ID: 147D0BE9258C6C95

View file

@ -111,7 +111,11 @@ func (gui *Gui) returnFocus(g *gocui.Gui, v *gocui.View) error {
// always fall back to services view if there's no 'previous' view stored
previousView, err = g.View("services")
if err != nil {
gui.Log.Error(err)
// Or fall back to the containers view if we are not in a docker-compose project
previousView, err = g.View("containers")
if err != nil {
gui.Log.Error(err)
}
}
}
return gui.switchFocus(g, v, previousView)