Skip to content

Commit 73118a1

Browse files
author
Hans Kristian Flaatten
committed
fix(api): sort each() by _id to prevent out of order issues when updating documents
1 parent 90e3611 commit 73118a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ let request = module.exports._requestDefaults();
4141

4242
query.skip = query.skip || 0;
4343
query.limit = query.limit || 50;
44+
query.sort = query.sort || '_id';
4445

4546
module.exports[type](query, function typeCb(typeErr, res, body) {
4647
if (typeErr) { return done(typeErr); }

0 commit comments

Comments
 (0)