@knowlearning/agents 0.9.121 → 0.9.122
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/deno.js +2 -1
- package/package.json +1 -1
package/deno.js
CHANGED
|
@@ -11,7 +11,8 @@ function Connection() {
|
|
|
11
11
|
this.send = message => denoProcess.postMessage({ ...message, connection })
|
|
12
12
|
|
|
13
13
|
denoProcess.addEventListener('message', ({ data }) => {
|
|
14
|
-
if (data.connection === connection) this.onmessage(data)
|
|
14
|
+
if (data && data.connection === connection) this.onmessage(data)
|
|
15
|
+
else this.onmessage(data) // think of better way that doesn't pass all heartbeats to all agents inside domain agent
|
|
15
16
|
})
|
|
16
17
|
|
|
17
18
|
// TODO: consider what onclose and onerror mean
|