@nxtedition/deepstream.io-client-js 24.0.16 → 24.1.0
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
|
@@ -23,7 +23,7 @@ class Listener {
|
|
|
23
23
|
data = value
|
|
24
24
|
} else if (value && typeof value === 'object') {
|
|
25
25
|
data = this._stringify(value)
|
|
26
|
-
} else {
|
|
26
|
+
} else if (data != null) {
|
|
27
27
|
throw new Error(`invalid value: ${value}`)
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -86,8 +86,14 @@ class Listener {
|
|
|
86
86
|
if (value$) {
|
|
87
87
|
const subscription = value$.pipe(this._pipe).subscribe({
|
|
88
88
|
next: (data) => {
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
if (data == null) {
|
|
90
|
+
this._connection.sendMsg(this._topic, C.ACTIONS.LISTEN_REJECT, [this._pattern, name])
|
|
91
|
+
subscription.unsubscribe()
|
|
92
|
+
this._subscriptions.set(name, null)
|
|
93
|
+
} else {
|
|
94
|
+
const version = `INF-${this._connection.hasher.h64ToString(data)}`
|
|
95
|
+
this._connection.sendMsg(this._topic, C.ACTIONS.UPDATE, [name, version, data])
|
|
96
|
+
}
|
|
91
97
|
},
|
|
92
98
|
error: (err) => {
|
|
93
99
|
this._error(name, err)
|