@nxtedition/deepstream.io-client-js 23.4.38 → 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.38",
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)
@@ -178,30 +177,12 @@ class RecordHandler {
178
177
  return
179
178
  }
180
179
 
181
- if (!this._syncQueue) {
182
- this._syncQueue = []
183
- queueMicrotask(() => {
184
- const syncQueue = this._syncQueue
185
- if (!syncQueue) {
186
- return
187
- }
188
-
189
- const token = xuid()
190
-
191
- this._syncQueue = null
192
- this._syncEmitter.once(token, () => {
193
- for (const callback of syncQueue) {
194
- callback()
195
- }
196
- })
180
+ const token = xuid()
181
+ this._syncEmitter.once(token, resolve)
197
182
 
198
- if (this._connected) {
199
- this._connection.sendMsg(C.TOPIC.RECORD, C.ACTIONS.SYNC, [token])
200
- }
201
- })
183
+ if (this._connected) {
184
+ this._connection.sendMsg(C.TOPIC.RECORD, C.ACTIONS.SYNC, [token])
202
185
  }
203
-
204
- this._syncQueue.push(resolve)
205
186
  }
206
187
 
207
188
  for (const rec of this._pending) {