1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

deal with the fact that a nil wrapped in an interface is not equal to nil

This commit is contained in:
Jesse Duffield
2020-08-22 15:56:30 +10:00
parent e290710f67
commit 5874529f43
6 changed files with 91 additions and 64 deletions

View File

@ -181,11 +181,11 @@ func (gui *Gui) fetch(canPromptForCredentials bool) (err error) {
func (gui *Gui) handleCopySelectedSideContextItemToClipboard() error {
// important to note that this assumes we've selected an item in a side context
item := gui.getSideContextSelectedItem()
itemId := gui.getSideContextSelectedItemId()
if item == nil {
if itemId == "" {
return nil
}
return gui.OSCommand.CopyToClipboard(item.ID())
return gui.OSCommand.CopyToClipboard(itemId)
}