Skip to content

Commit 9aac577

Browse files
committed
Merge branch 'ignore-undefined-fields' of https://github.com/Lapixx/node-mongodb-native into Lapixx-ignore-undefined-fields
2 parents accc949 + d631978 commit 9aac577

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)