Skip to content

Commit

Permalink
MongoDB do not support undefined value
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielelana committed Dec 17, 2014
1 parent ff468a1 commit 9de8d24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/distinct_and_count.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DBCollection.prototype.distinctAndCount = function(field, query) {
.chain()
.values()
.map(function(value) {
if (value === null || value === undefined) {
if (value === null) {
return {valueOf: function() {return value}}
}
return value
Expand Down

0 comments on commit 9de8d24

Please sign in to comment.