diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-22 15:56:30 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-08-23 14:29:18 +1000 |
commit | 5874529f4310c6b4b0abdfcef714ff6f6cc8afd5 (patch) | |
tree | 3a225e081659c52cd548cace154f2f2c64f2894b /pkg/gui/global_handlers.go | |
parent | e290710f6741c046ee7e52e622af813e8955639b (diff) |
deal with the fact that a nil wrapped in an interface is not equal to nil
Diffstat (limited to 'pkg/gui/global_handlers.go')
-rw-r--r-- | pkg/gui/global_handlers.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/gui/global_handlers.go b/pkg/gui/global_handlers.go index c2ae9cae8..574efdc6d 100644 --- a/pkg/gui/global_handlers.go +++ b/pkg/gui/global_handlers.go @@ -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) } |