Comparing version 0.0.14 to 0.0.15
@@ -1397,26 +1397,16 @@ 'use strict'; | ||
var i; | ||
var _ids = ids; | ||
var pluck = extractOption('pluck', options); | ||
if (pluck !== undefined) { | ||
_ids = []; | ||
for (i = 0; i < ids.length; i++) { | ||
_ids[i] = ids[i][pluck]; | ||
} | ||
} | ||
for (i = 0; i < _ids.length; i++) { | ||
if (!(_ids[i] instanceof ObjectID)) { | ||
for (i = 0; i < ids.length; i++) { | ||
if (!(ids[i] instanceof ObjectID)) { | ||
return callback('Non ObjectId in the array'); | ||
} | ||
if (index[_ids[i].toHexString()] === undefined) { | ||
index[_ids[i].toHexString()] = [i]; | ||
if (index[ids[i].toHexString()] === undefined) { | ||
index[ids[i].toHexString()] = [i]; | ||
} else { | ||
index[_ids[i].toHexString()].push(i); | ||
index[ids[i].toHexString()].push(i); | ||
} | ||
} | ||
this.find({_id: {'$in': _ids}}, fields, options, function (err, models) { | ||
this.find({_id: {'$in': ids}}, fields, options, function (err, models) { | ||
if (err) { | ||
@@ -1423,0 +1413,0 @@ return callback(err); |
@@ -8,3 +8,3 @@ { | ||
], | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"engines": { | ||
@@ -11,0 +11,0 @@ "node": ">=0.4.12" |
Sorry, the diff of this file is not supported yet
88103
1840