Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't die on invalid page numbers (default to 1)

  • Loading branch information...
commit 4f368f3b07dcbf2f762dba98ccd2cd9e1588dcda 1 parent ef23fd8
Brian Carper authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/blog/middleware.clj
2  src/blog/middleware.clj
View
@@ -86,7 +86,7 @@
[handler]
(fn [request]
(let [{{page-number "p"} :query-params} request]
- (binding [PAGE-NUMBER (or (util/safe-int page-number) 1)]
+ (binding [PAGE-NUMBER (or (try (util/safe-int page-number) (catch Exception _ 1)) 1)]
(handler request)))))
(declare USER)
Please sign in to comment.
Something went wrong with that request. Please try again.