Skip to content

Commit

Permalink
[server] query.limit is a number
Browse files Browse the repository at this point in the history
  • Loading branch information
t8g committed Sep 1, 2017
1 parent 5717008 commit d82c487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/routes/editLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function getEditLog(req, res){
// ask for next edits to replace the filtered ones
let skipIndex = aggregationPipeline.findIndex(p => p['$skip'])
if(skipIndex)
aggregationPipeline[skipIndex]['$skip'] += query.limit
aggregationPipeline[skipIndex]['$skip'] += +query.limit
else{
let limitIndex = aggregationPipeline.findIndex(p => p['$limit'])
aggregationPipeline = aggregationPipeline.slice(0,limitIndex)
Expand Down

0 comments on commit d82c487

Please sign in to comment.