Skip to content

Commit

Permalink
more spec-like array sorting 👓
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus committed Dec 2, 2014
1 parent d88f093 commit b4da1ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/datastore/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Transaction.prototype.commit = function(callback) {

// Group entities together by action (delete or save).
.sort(function (a, b) {
return a.method > b.method;
return a.method > b.method ? 1 : a.method < b.method ? -1 : 0;
})

// Group arguments together so that we only make one call to each method.
Expand Down

0 comments on commit b4da1ae

Please sign in to comment.