From 0464c2cdd8bd32bf0172cd79128bbcd27c3a4ba8 Mon Sep 17 00:00:00 2001 From: Tsyren Date: Thu, 11 Oct 2018 12:00:52 +0200 Subject: [PATCH] Add comment to return statement --- pry/io_js.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pry/io_js.go b/pry/io_js.go index 7def8fb..36e54e9 100644 --- a/pry/io_js.go +++ b/pry/io_js.go @@ -48,8 +48,7 @@ func NewHistory() (*BrowserHistory, error) { func (bh *BrowserHistory) Load() error { hist := js.Global().Get("localStorage").Get("history") if hist.Type() == js.TypeUndefined { - // dirty because it is actually an error - return nil + return nil // nothing to unmarashal } var records []string if err := json.Unmarshal([]byte(hist.String()), &records); err != nil {