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

Commit 6186f8a

Browse files
committedSep 25, 2019
COMPASS-3836: Handle Binary properly across BSON versions
1 parent 3116e58 commit 6186f8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/modes/strict.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ module.exports = {
113113
return bson.ObjectID(data.$oid);
114114
},
115115
$binary: function(val) {
116-
return bson.Binary(new Buffer(val.$binary, 'base64'), parseInt(val.$type, 16));
116+
return new bson.Binary(new Buffer(val.$binary, 'base64'), parseInt(val.$type, 16));
117117
},
118118
$ref: function(val) {
119119
var id = typeof val.$id === 'object'

0 commit comments

Comments
 (0)
This repository has been archived.