[FIX] compiler: do not pass dynamic props object as is

The child receiving the props can observe changes made to the passed
t-props object which is not desirable.
This commit is contained in:
Samuel Degueldre
2022-01-27 12:58:04 +01:00
committed by Aaron Bohy
parent bb6479f44f
commit a221411938
4 changed files with 48 additions and 6 deletions
@@ -968,7 +968,7 @@ exports[`basics update props of component without concrete own node 1`] = `
return function template(ctx, node, key = \\"\\") {
const tKey_1 = ctx['childProps'].key;
let b2 = toggler(tKey_1, component(\`Child\`, ctx['childProps'], tKey_1 + key + \`__1\`, node, ctx));
let b2 = toggler(tKey_1, component(\`Child\`, Object.assign({}, ctx['childProps']), tKey_1 + key + \`__1\`, node, ctx));
return block1([], [b2]);
}
}"