Skip to content

Commit 698fe52

Browse files
committed
Use static arguments
1 parent 6212f01 commit 698fe52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/transforms/framer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ class Framer {
4040

4141
static decode (client, buf) {
4242
// Read header
43-
if (this.batchHeader && buf[0] !== this.batchHeader) throw Error(`bad batch packet header, received: ${buf[0]}, expected: ${this.batchHeader}`)
44-
const buffer = buf.slice(this.batchHeader ? 1 : 0)
43+
if (client.batchHeader && buf[0] !== client.batchHeader) throw Error(`bad batch packet header, received: ${buf[0]}, expected: ${client.batchHeader}`)
44+
const buffer = buf.slice(client.batchHeader ? 1 : 0)
4545
// Decompress
4646
let decompressed
4747
if (client.features.compressorInHeader && client.compressionReady) {
48-
decompressed = this.decompress(buf[0], buffer.slice(1))
48+
decompressed = this.decompress(buffer[0], buffer.slice(1))
4949
} else {
5050
// On old versions, compressor is session-wide ; failing to decompress
5151
// a packet will assume it's not compressed

0 commit comments

Comments
 (0)