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:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user