fix error when badger could not find recent repos key

This commit is contained in:
Shawn Smith
2021-05-26 12:20:15 +09:00
parent 09fa920609
commit 30107c813a

View File

@@ -156,7 +156,7 @@ type recentItem struct {
func updateRecentlyViewed(txn *badger.Txn, repo string) error {
var recent []recentItem
item, err := txn.Get([]byte("recent"))
if err != nil {
if err != nil && err != badger.ErrKeyNotFound {
return err
}