@knowlearning/agents 0.3.6 → 0.3.8
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/package.json +1 -1
- package/persistence/json.js +1 -1
- package/vue/3/component.js +2 -2
package/package.json
CHANGED
package/persistence/json.js
CHANGED
|
@@ -29,7 +29,7 @@ export default function MutableProxy(state, interact, ephemeralPaths={}, parentP
|
|
|
29
29
|
.entries(state)
|
|
30
30
|
.filter(([, value]) => value instanceof Object)
|
|
31
31
|
.forEach(([key, value]) => {
|
|
32
|
-
if (isArray && /^\d+$/.test(
|
|
32
|
+
if (isArray && /^\d+$/.test(key)) key = parseInt(key)
|
|
33
33
|
state[key] = childMutableProxy(key, value)
|
|
34
34
|
})
|
|
35
35
|
|
package/vue/3/component.js
CHANGED
|
@@ -8,11 +8,11 @@ function isScopeSerializable(v) {
|
|
|
8
8
|
)
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export default async function (module, props) {
|
|
11
|
+
export default async function (module, props, scope) {
|
|
12
12
|
const component = module.default ? { ...module.default } : { ...module } // copy component since we will mess with mounted and data functions
|
|
13
13
|
|
|
14
14
|
if (!component.ephemeral) {
|
|
15
|
-
const state = await Agent.mutate()
|
|
15
|
+
const state = await Agent.mutate(scope)
|
|
16
16
|
|
|
17
17
|
if (component.data) {
|
|
18
18
|
const origDataFn = component.data
|