We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc5e263 commit 51648c0Copy full SHA for 51648c0
src/parser/deserializer.ts
@@ -432,11 +432,11 @@ function deserializeObject(
432
433
if (promoteBuffers && promoteValues) {
434
value = _buffer;
435
- } else if (subType === constants.BSON_BINARY_SUBTYPE_UUID_NEW) {
436
- const binary = new Binary(buffer.slice(index, index + binarySize), subType);
437
- value = UUID.isValid(binary) ? binary.toUUID() : binary;
438
} else {
439
value = new Binary(buffer.slice(index, index + binarySize), subType);
+ if (subType === constants.BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
+ value = value.toUUID();
+ }
440
}
441
442
0 commit comments