@nxtedition/deepstream.io-client-js 23.4.37 → 23.4.39

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.37",
3
+ "version": "23.4.39",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "bugs": {
@@ -35,7 +35,6 @@ class RecordHandler {
35
35
  }
36
36
 
37
37
  this._syncEmitter = new EventEmitter()
38
- this._syncQueue = null
39
38
 
40
39
  this.set = this.set.bind(this)
41
40
  this.get = this.get.bind(this)
@@ -73,8 +72,6 @@ class RecordHandler {
73
72
  }
74
73
 
75
74
  _prune()
76
-
77
- this._syncAll = this._syncAll.bind(this)
78
75
  }
79
76
 
80
77
  _onRef(rec) {
@@ -180,30 +177,12 @@ class RecordHandler {
180
177
  return
181
178
  }
182
179
 
183
- if (!this._syncQueue) {
184
- this._syncQueue = []
185
- queueMicrotask(() => {
186
- const syncQueue = this._syncQueue
187
- if (!syncQueue) {
188
- return
189
- }
190
-
191
- const token = xuid()
192
-
193
- this._syncQueue = null
194
- this._syncEmitter.once(token, () => {
195
- for (const callback of syncQueue) {
196
- callback()
197
- }
198
- })
180
+ const token = xuid()
181
+ this._syncEmitter.once(token, resolve)
199
182
 
200
- if (this._connected) {
201
- this._connection.sendMsg(C.TOPIC.RECORD, C.ACTIONS.SYNC, [token])
202
- }
203
- })
183
+ if (this._connected) {
184
+ this._connection.sendMsg(C.TOPIC.RECORD, C.ACTIONS.SYNC, [token])
204
185
  }
205
-
206
- this._syncQueue.push(resolve)
207
186
  }
208
187
 
209
188
  for (const rec of this._pending) {