Skip to content
Browse files

allow maxpage 0

  • Loading branch information...
1 parent 397b6ad commit def9ab7dcf439baa40586fb23a6bee7c94ce83a9 @thejh committed Dec 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 functions.js
View
2 functions.js
@@ -269,7 +269,7 @@ exports.pagenav = function PAGENAV(template, functions, context, chunk, done) {
var maxpage = +context.maxpage
var urlpos = context.pageURLPos
if (!page) throw new Error('invalid page')
- if (!maxpage) throw new Error('invalid maxpage')
+ if (!maxpage && maxpage !== 0) throw new Error('invalid maxpage: '+maxpage)
if (!urlpos) throw new Error('invalid urlpos')
var leftURL = addToURLPart(-1)
var rightURL = addToURLPart(1)

0 comments on commit def9ab7

Please sign in to comment.
Something went wrong with that request. Please try again.