@knowlearning/agents 0.9.145 → 0.9.146

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/vue/image.vue +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.9.145",
3
+ "version": "0.9.146",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "node.js",
6
6
  "browser": "browser.js",
package/vue/image.vue CHANGED
@@ -11,21 +11,21 @@
11
11
 
12
12
  const props = defineProps({ id: String })
13
13
 
14
+ let latestURLRequest = 0
15
+
14
16
  const downloadURL = ref(downloadURLRegistry[props.id])
15
17
 
16
18
  if (!downloadURL.value) setDownloadURL()
17
19
 
18
20
  watch(props, setDownloadURL)
19
-
20
- let latestRequest = 0
21
21
  async function setDownloadURL() {
22
22
  downloadURL.value = null
23
- latestRequest += 1
23
+ latestURLRequest += 1
24
24
 
25
- const thisRequest = latestRequest
25
+ const thisRequest = latestURLRequest
26
26
  const newURL = downloadURLRegistry[props.id] || await Agent.download(props.id).url()
27
27
 
28
28
  downloadURLRegistry[props.id] = newURL
29
- if (latestRequest === thisRequest) downloadURL.value = newURL
29
+ if (latestURLRequest === thisRequest) downloadURL.value = newURL
30
30
  }
31
31
  </script>