Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Commit

Permalink
COMPASS-3836: Handle Binary properly across BSON versions
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Sep 25, 2019
1 parent 3116e58 commit 6186f8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/modes/strict.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ module.exports = {
return bson.ObjectID(data.$oid);
},
$binary: function(val) {
return bson.Binary(new Buffer(val.$binary, 'base64'), parseInt(val.$type, 16));
return new bson.Binary(new Buffer(val.$binary, 'base64'), parseInt(val.$type, 16));
},
$ref: function(val) {
var id = typeof val.$id === 'object'
Expand Down

0 comments on commit 6186f8a

Please sign in to comment.