Don't print error message if history file doesn't exist

This commit is contained in:
Zachary Yedidia
2017-10-22 18:00:47 -04:00
parent 5b5998cf14
commit b9e916999f

View File

@@ -497,11 +497,11 @@ func (m *Messenger) LoadHistory() {
decoder := gob.NewDecoder(file)
err = decoder.Decode(&decodedMap)
file.Close()
}
if err != nil {
m.Error("Error loading history:", err)
return
if err != nil {
m.Error("Error loading history:", err)
return
}
}
m.history = decodedMap