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

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.10",
3
+ "version": "23.4.11",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "bugs": {
@@ -11,8 +11,6 @@ class Listener {
11
11
  this._connection = this._handler._connection
12
12
  this._subscriptions = new Map()
13
13
  this._stringify = stringify || JSON.stringify
14
- this._data = ''
15
- this._version = ''
16
14
 
17
15
  this._$onConnectionStateChange()
18
16
 
@@ -76,21 +74,13 @@ class Listener {
76
74
  }
77
75
 
78
76
  return data
79
- })
77
+ }),
78
+ rxjs.distinctUntilChanged()
80
79
  )
81
80
  .subscribe({
82
81
  next: (data) => {
83
- if (data === this._data) {
84
- return
85
- }
86
-
87
- this._data = data
88
- this._version = `INF-${this._connection.hasher.h64ToString(data)}`
89
- this._connection.sendMsg(this._topic, C.ACTIONS.UPDATE, [
90
- name,
91
- this._version,
92
- this._data,
93
- ])
82
+ const version = `INF-${this._connection.hasher.h64ToString(data)}`
83
+ this._connection.sendMsg(this._topic, C.ACTIONS.UPDATE, [name, version, data])
94
84
  },
95
85
  error: (err) => {
96
86
  this._error(name, err)