Comparing version 1.2.0 to 1.2.1
@@ -80,7 +80,7 @@ module.exports = Query; | ||
if (!this.query.size && this.defaultSize) { | ||
this.query.size = this.defaultSize; | ||
if (!this.query.size) { | ||
this.query.size = this.defaultSize || 0; | ||
} | ||
if (this.query.size && this.maxSize && this.query.size > this.maxSize) { | ||
if (this.maxSize && this.query.size > this.maxSize) { | ||
this.query.size = this.maxSize; | ||
@@ -236,3 +236,7 @@ } | ||
if (arguments.length === 0) { | ||
return Math.floor(this.query.from / size) + 1; | ||
if (size === 0) { | ||
return 1; | ||
} else { | ||
return Math.floor(this.query.from / size) + 1; | ||
} | ||
} | ||
@@ -239,0 +243,0 @@ |
{ | ||
"name": "mio", | ||
"description": "A common model layer between client and server for building REST APIs and web applications.", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"homepage": "https://github.com/mio/mio", | ||
@@ -6,0 +6,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
14140
427548