Feedback from Naomi review.

This commit is contained in:
David Glasser
2013-01-30 09:48:47 -08:00
parent 25c7ad2262
commit e10cba88cb

View File

@@ -15,12 +15,8 @@ var Future = __meteor_bootstrap__.require(path.join('fibers', 'future'));
var replaceMongoAtomWithMeteor = function (document) {
if (document instanceof MongoDB.Binary) {
var meteorBinary = EJSON.newBinary(document.length());
var buffer = document.value(true);
for (var i = 0; i < meteorBinary.length; ++i) {
meteorBinary[i] = buffer[i];
}
return meteorBinary;
return new Uint8Array(buffer);
}
if (document instanceof MongoDB.ObjectID) {
return new Meteor.Collection.ObjectID(document.toHexString());