Skip to content

Commit 51648c0

Browse files
committed
chore: sync syntax
1 parent fc5e263 commit 51648c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/parser/deserializer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,11 @@ function deserializeObject(
432432

433433
if (promoteBuffers && promoteValues) {
434434
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;
438435
} else {
439436
value = new Binary(buffer.slice(index, index + binarySize), subType);
437+
if (subType === constants.BSON_BINARY_SUBTYPE_UUID_NEW && UUID.isValid(value)) {
438+
value = value.toUUID();
439+
}
440440
}
441441
}
442442

0 commit comments

Comments
 (0)