Skip to content

Commit

Permalink
Making sure we are using {: -1} for sorting when using tailable cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
Mircea Danila Dumitrescu committed May 8, 2014
1 parent 80031bc commit 6e77bb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cube/genericGetter.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function customQuery(collectionObj, filter, sort, limit, batchSize, streamified,

cursor = collectionObj.find(filter, cursorOptions);
if (streamified) {
stream = cursor.stream();
stream = cursor.sort({$natural: -1}).stream();
stream.on('data', function (document) {
documentHandler({id: document._id instanceof mongodb.ObjectID ? undefined : document._id, time: document.t, data: document.d});
});
Expand Down

0 comments on commit 6e77bb6

Please sign in to comment.