Comparing version 2.0.0-26 to 2.0.0-27
@@ -1163,15 +1163,5 @@ /* | ||
// don't append trailing control characters | ||
const mbuf = Buffer.concat(this.payload.chunks, this.payload.size) | ||
if (this.options.payload === Payload.Binary) { | ||
this.payload.msg = mbuf | ||
} else { | ||
this.payload.msg = mbuf.toString(this.encoding) | ||
} | ||
this.payload.msg = Buffer.concat(this.payload.chunks, this.payload.size) | ||
} else { | ||
if (this.options.payload === Payload.Binary) { | ||
this.payload.msg = this.inbound.slice(0, this.payload.size) | ||
} else { | ||
this.payload.msg = this.inbound.toString(this.encoding, 0, this.payload.size) | ||
} | ||
this.payload.msg = this.inbound.slice(0, this.payload.size) | ||
} | ||
@@ -1252,6 +1242,8 @@ | ||
// encoding set to 'utf8' | ||
msg = JSON.parse(this.payload.msg.toString(this.options.encoding)) | ||
msg = JSON.parse(msg.toString(this.options.encoding)) | ||
} catch (e) { | ||
err = new NatsError(ErrorCode.BAD_JSON, ErrorCode.BAD_JSON, e) | ||
} | ||
} else if (this.options.payload === Payload.String) { | ||
msg = msg.toString(this.options.encoding) | ||
} | ||
@@ -1258,0 +1250,0 @@ try { |
{ | ||
"name": "nats", | ||
"version": "2.0.0-26", | ||
"version": "2.0.0-27", | ||
"description": "Node.js client for NATS, a lightweight, high-performance cloud native messaging system", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119629
2384