@knowlearning/agents 0.4.12 → 0.4.14
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/agents/browser/root.js +2 -2
- package/agents/generic.js +2 -0
- package/package.json +1 -1
package/agents/browser/root.js
CHANGED
|
@@ -26,9 +26,9 @@ export default () => {
|
|
|
26
26
|
reboot: () => window.location.reload()
|
|
27
27
|
})
|
|
28
28
|
|
|
29
|
-
const { state
|
|
29
|
+
const { state } = agent
|
|
30
|
+
// TODO: remove agent.state proxy here as part of "get rid of default scope" work
|
|
30
31
|
agent.state = (scope=host,user,domain) => state(scope, user, domain)
|
|
31
|
-
agent.mutate = (scope=host) => mutate(scope)
|
|
32
32
|
agent.local = () => {
|
|
33
33
|
if (isLocal()) return
|
|
34
34
|
|
package/agents/generic.js
CHANGED
|
@@ -230,6 +230,7 @@ export default function Agent({ host, token, WebSocket, protocol='ws', uuid, fet
|
|
|
230
230
|
// -1 indicates the result is a computed scope, so
|
|
231
231
|
// ii does not apply (we clear out the subscription to not cache value)
|
|
232
232
|
delete states[k]
|
|
233
|
+
delete keyToSubscriptionId[k]
|
|
233
234
|
delete subscriptions[id]
|
|
234
235
|
}
|
|
235
236
|
})
|
|
@@ -261,6 +262,7 @@ export default function Agent({ host, token, WebSocket, protocol='ws', uuid, fet
|
|
|
261
262
|
removeWatcher(k, watchFn)
|
|
262
263
|
if (watchers[k].length === 0) {
|
|
263
264
|
delete subscriptions[keyToSubscriptionId[k]]
|
|
265
|
+
delete keyToSubscriptionId[k]
|
|
264
266
|
delete watchers[k]
|
|
265
267
|
}
|
|
266
268
|
}
|