Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes broken new Binary(buffer) constructor
  • Loading branch information
Marcello Bastea-Forte committed Jun 25, 2011
1 parent 8bc4b70 commit 330c7e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongodb/bson/binary.js
Expand Up @@ -21,7 +21,7 @@ function Binary (buffer, subType) {
this.sub_type = subType == null ? bson.BSON.BSON_BINARY_SUBTYPE_DEFAULT : subType;
}

if (buffer != null && (buffer instanceof Number)) {
if (buffer != null && !(buffer instanceof Number)) {
this.buffer = buffer;
this.position = buffer.length;
} else {
Expand Down

0 comments on commit 330c7e0

Please sign in to comment.