@live-change/dao 0.8.34 → 0.8.35
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/lib/InboxReader.js +6 -6
- package/package.json +2 -2
package/lib/InboxReader.js
CHANGED
|
@@ -17,20 +17,20 @@ class InboxReader {
|
|
|
17
17
|
this.readPromiseResolve = null
|
|
18
18
|
|
|
19
19
|
this.observer = (signal, ...args) => {
|
|
20
|
-
if(signal
|
|
20
|
+
if(signal === 'error') {
|
|
21
21
|
const error = args[0]
|
|
22
|
-
console.error("
|
|
22
|
+
console.error("INBOX READER ERROR", error.stack || error)
|
|
23
23
|
return
|
|
24
24
|
}
|
|
25
|
-
if(signal
|
|
26
|
-
const [
|
|
25
|
+
if(signal === 'putByField') {
|
|
26
|
+
const [_field, _id, message] = args
|
|
27
27
|
this.handleMessage(message)
|
|
28
|
-
} else if(signal
|
|
28
|
+
} else if(signal === 'set') {
|
|
29
29
|
const value = args[0]
|
|
30
30
|
for (const message of value) {
|
|
31
31
|
this.handleMessage(message)
|
|
32
32
|
}
|
|
33
|
-
} else if(signal
|
|
33
|
+
} else if(signal === 'push') {
|
|
34
34
|
const [...messages] = args
|
|
35
35
|
for(const message of messages) this.handleMessage(message)
|
|
36
36
|
} else {
|
package/package.json
CHANGED