fixing undefined

This commit is contained in:
Rizky 2023-10-24 13:14:55 +07:00
parent 0bba17b93a
commit 82da6e9e68
1 changed files with 6 additions and 2 deletions

View File

@ -148,7 +148,7 @@ export const mergeScopeUpwards = (
scope = { ...cur.scope, ...indexedScope, ...cur.comp?.propval };
for (const [k, v] of Object.entries(scope)) {
finalScope[k] = v;
if (typeof finalScope[k] === "undefined") finalScope[k] = v;
}
if (opt?.each) {
if (!opt.each(cur, scope)) {
@ -160,6 +160,10 @@ export const mergeScopeUpwards = (
cur = p.treeMeta[cur.parent_id];
}
if (meta.item.name === "item" && meta.item.type === "item") {
console.log(finalScope);
}
return finalScope;
};
@ -207,7 +211,7 @@ const createPassProp = (
if (k === "children") continue;
meta.scope[k] = v;
}
return modifyChildIndex(arg.children, scopeIndex);
}