There was an error while loading. Please reload this page.
2 parents 38f1c3e + 7ce5fea commit d322401Copy full SHA for d322401
server/core/context.js
@@ -572,11 +572,15 @@ class Context {
572
*/
573
queryPageSort(query) {
574
if (this.params) {
575
-if (this.params.limit)
576
-query.limit(this.params.limit);
+if (this.params.limit) {
+let limit = parseInt(this.params.limit);
577
+query.limit(limit);
578
+}
579
-if (this.params.offset)
-query.skip(this.params.offset);
580
+if (this.params.offset) {
581
+let offset = parseInt(this.params.offset);
582
+query.skip(offset);
583
584
585
if (this.params.sort)
586
query.sort(this.params.sort.replace(/,/, " "));
0 commit comments