Skip to content

Commit

Permalink
chore: sync syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Apr 24, 2023
1 parent fc5e263 commit 51648c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/parser/deserializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,11 @@ function deserializeObject(

if (promoteBuffers && promoteValues) {
value = _buffer;
} else if (subType === constants.BSON_BINARY_SUBTYPE_UUID_NEW) {
const binary = new Binary(buffer.slice(index, index + binarySize), subType);
value = UUID.isValid(binary) ? binary.toUUID() : binary;
} else {
value = new Binary(buffer.slice(index, index + binarySize), subType);
if (subType === constants.BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
value = value.toUUID();
}
}
}

Expand Down

0 comments on commit 51648c0

Please sign in to comment.