diff --git a/pkg/book/book.go b/pkg/book/book.go index 2593fd0..39d4e93 100644 --- a/pkg/book/book.go +++ b/pkg/book/book.go @@ -50,11 +50,8 @@ func MakeHandler(fn func(http.ResponseWriter, *http.Request, string)) http.Handl func ViewHandler(w http.ResponseWriter, r *http.Request, title string) { p, err := loadPage(title) - if p == nil { + if p == nil || err != nil { utils.NotFound(w, r) - } - - if err != nil { return }