Skip to content

Commit e4df5f4

Browse files
committed
fix: not all message payloads are arrays of Buffer
1 parent 4b2b81f commit e4df5f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/cmap/message_stream.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ class MessageStream extends Duplex {
7676
// TODO: agreed compressor should live in `StreamDescription`
7777
const shouldCompress = operationDescription && !!operationDescription.agreedCompressor;
7878
if (!shouldCompress || !canCompress(command)) {
79-
this.push(Buffer.concat(command.toBin()));
79+
const data = command.toBin();
80+
this.push(Array.isArray(data) ? Buffer.concat(data) : data);
8081
return;
8182
}
8283

0 commit comments

Comments
 (0)