add back else clause

Add back else clause after realizing the error check doesn't return after logging.
This commit is contained in:
Colin Axner 2020-12-07 11:28:51 +01:00
parent 30fc088cec
commit fcf01a6039
1 changed files with 4 additions and 3 deletions

View File

@ -171,11 +171,12 @@ func updateTimelineCache(tl *localTimeline, reset bool) {
postsInterfaces, err := tl.m.Get()
if err != nil {
log.Error("[READ] Unable to cache posts: %v", err)
} else {
castPosts := postsInterfaces.([]PublicPost)
tl.posts = &castPosts
}
castPosts := postsInterfaces.([]PublicPost)
tl.posts = &castPosts
}
}
func showLocalTimeline(app *App, w http.ResponseWriter, r *http.Request, page int, author, tag string) error {