@nxtedition/deepstream.io-client-js 23.4.11 → 23.4.12

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": "23.4.11",
3
+ "version": "23.4.12",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "bugs": {
@@ -62,6 +62,7 @@
62
62
  "bufferutil": "^4.0.7",
63
63
  "component-emitter2": "^1.3.5",
64
64
  "invariant": "^2.2.4",
65
+ "lodash.clonedeep": "^4.5.0",
65
66
  "utf-8-validate": "^6.0.3",
66
67
  "ws": "^8.13.0",
67
68
  "xuid": "^4.1.2",
@@ -4,6 +4,7 @@ const C = require('../constants/constants')
4
4
  const messageParser = require('../message/message-parser')
5
5
  const xuid = require('xuid')
6
6
  const invariant = require('invariant')
7
+ const cloneDeep = require('lodash.clonedeep')
7
8
 
8
9
  class Record {
9
10
  static STATE = C.RECORD_STATE
@@ -111,7 +112,7 @@ class Record {
111
112
 
112
113
  if (!this._version) {
113
114
  this._patches = path && this._patches ? this._patches : []
114
- this._patches.push(path, jsonPath.jsonClone(data))
115
+ this._patches.push(path, cloneDeep(data))
115
116
  this._handler._patch.add(this)
116
117
  }
117
118
 
@@ -304,7 +305,7 @@ class Record {
304
305
  if (this._version.charAt(0) !== 'I') {
305
306
  let patchData = this._data
306
307
  for (let n = 0; n < this._patches.length; n += 2) {
307
- patchData = jsonPath.set(patchData, this._patches[n + 0], this._patches[n + 1], true)
308
+ patchData = jsonPath.set(patchData, this._patches[n + 0], this._patches[n + 1], false)
308
309
  }
309
310
  this._update(patchData)
310
311
  }