@nxtedition/deepstream.io-client-js 31.2.8 → 31.2.9

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": "31.2.8",
3
+ "version": "31.2.9",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "type": "module",
@@ -680,12 +680,11 @@ class RecordHandler {
680
680
  subscription.record = this.getRecord(name).subscribe(onUpdate, subscription)
681
681
 
682
682
  if (sync) {
683
+ // TODO (fix): What about sync timeout?
683
684
  this._sync(onSync, sync === true ? 'WEAK' : sync, subscription)
684
685
  } else {
685
- subscription.synced = true
686
+ onSync(subscription)
686
687
  }
687
-
688
- onUpdate(subscription.record, subscription)
689
688
  })
690
689
  }
691
690
 
@@ -778,6 +777,7 @@ class RecordHandler {
778
777
  throw new Error(`invalid sync type: ${type}`)
779
778
  }
780
779
 
780
+ // TODO (fix): timeout?
781
781
  setTimeout(() => {
782
782
  // Token must be universally unique until deepstream properly separates
783
783
  // sync requests from different sockets.