@knowlearning/agents 0.9.127 → 0.9.128

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.
@@ -151,10 +151,6 @@ function embed(environment, iframe) {
151
151
  }
152
152
  })
153
153
 
154
- // write in a temporary loading notification while frame loads
155
- const cw = iframe.contentWindow
156
- if (cw) cw.document.body.innerHTML = 'Loading...'
157
-
158
154
  // TODO: make sure content security policy headers for embedded domain always restrict iframe
159
155
  // src to only self for embedded domain
160
156
  iframe.onload = () => {
package/agents/watch.js CHANGED
@@ -80,9 +80,13 @@ export default function({ metadata, environment, state, watchers, synced, sentUp
80
80
  }
81
81
 
82
82
  function removeWatcher(key, fn) {
83
+ if (!watchers[key]) {
84
+ console.warn('NO WATCHERS FOR KEY', key, fn)
85
+ return
86
+ }
83
87
  const watcherIndex = watchers[key].findIndex(x => x === fn)
84
88
  if (watcherIndex > -1) watchers[key].splice(watcherIndex, 1)
85
- else console.warn('TRIED TO REMOVE WATCHER THAT DOES NOT EXIST')
89
+ else console.warn('TRIED TO REMOVE WATCHER THAT DOES NOT EXIST', key, fn)
86
90
  }
87
91
 
88
92
  return [ watch, removeWatcher ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.9.127",
3
+ "version": "0.9.128",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "node.js",
6
6
  "browser": "browser.js",