@nxtedition/deepstream.io-client-js 32.0.24 → 32.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/deepstream.io-client-js",
3
- "version": "32.0.24",
3
+ "version": "32.0.25",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "type": "module",
@@ -96,7 +96,7 @@ Connection.prototype._createEndpoint = function () {
96
96
  })
97
97
  this._endpoint.binaryType = 'nodebuffer'
98
98
  this._endpoint.onmessage = ({ data: buf }) => {
99
- this._onMessage(buf.toString('utf8', buf[0] >= 128 ? buf[0] - 128 : 0, buf.length))
99
+ this._onMessage(buf.toString('utf8', buf[0] > 128 ? buf[0] - 128 : 0))
100
100
  }
101
101
  } else {
102
102
  const decoder = new globalThis.TextDecoder()
@@ -104,7 +104,7 @@ Connection.prototype._createEndpoint = function () {
104
104
  this._endpoint.binaryType = 'arraybuffer'
105
105
  this._endpoint.onmessage = ({ data }) => {
106
106
  let buf = new Uint8Array(data)
107
- if (buf[0] >= 128) {
107
+ if (buf[0] > 128) {
108
108
  buf = buf.subarray(buf[0] - 128)
109
109
  }
110
110
  this._onMessage(decoder.decode(buf))