mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[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:
committed by
Aaron Bohy
parent
bb6479f44f
commit
a221411938
@@ -1104,7 +1104,7 @@ export class CodeGenerator {
|
||||
let propString = propStr;
|
||||
if (ast.dynamicProps) {
|
||||
if (!props.length) {
|
||||
propString = `${compileExpr(ast.dynamicProps)}`;
|
||||
propString = `Object.assign({}, ${compileExpr(ast.dynamicProps)})`;
|
||||
} else {
|
||||
propString = `Object.assign({}, ${compileExpr(ast.dynamicProps)}, ${propStr})`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user