Skip to content

Commit 2f2067a

Browse files
committed
Merge branch 'Lapixx-ignore-undefined-fields' into 2.0t push origin 2.0
2 parents accc949 + 528a449 commit 2f2067a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

HISTORY.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
2.0.40 07-14-2015
22
-----------------
33
- Updated mongodb-core to 1.2.8 for APM support and 2.4 wire protocol error handler fix.
4-
- NODE-506 Ensures that errors from bulk unordered and ordered are instanceof Error (Issue #1282, https://github.com/owenallenaz).
4+
- NODE-506 Ensures that errors from bulk unordered and ordered are instanceof Error (Issue #1282, https://github.com/owenallenaz).
5+
- NODE-526 Unique index not throwing duplicate key error.
6+
- NODE-528 Ignore undefined fields in Collection.find().
57

68
2.0.39 07-14-2015
79
-----------------

lib/collection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Collection.prototype.find = function() {
172172
options = args[0];
173173
}
174174

175-
if(len === 2 && !Array.isArray(fields)) {
175+
if(len === 2 && fields !== undefined && !Array.isArray(fields)) {
176176
var fieldKeys = Object.keys(fields);
177177
var is_option = false;
178178

0 commit comments

Comments
 (0)