Skip to content

Commit 5ddfae4

Browse files
committed
remove unnecessary toLocalBufferType calls
1 parent 0ee1a17 commit 5ddfae4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ export class BufferPool {
876876
}
877877
}
878878

879-
return ByteUtils.toLocalBufferType(result);
879+
return result;
880880
}
881881
}
882882

@@ -1339,7 +1339,7 @@ export function decorateDecryptionResult(
13391339
if (isTopLevelDecorateCall) {
13401340
// The original value could have been either a JS object or a BSON buffer
13411341
if (BSONByteUtils.isUint8Array(original)) {
1342-
original = deserialize(ByteUtils.toLocalBufferType(original));
1342+
original = deserialize(original);
13431343
}
13441344
if (BSONByteUtils.isUint8Array(decrypted)) {
13451345
throw new MongoRuntimeError('Expected result of decryption to be deserialized BSON object');

0 commit comments

Comments
 (0)