mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] props: prop names can contain -
This commit is contained in:
committed by
Aaron Bohy
parent
8239a5d2cd
commit
b90180a9e0
@@ -967,7 +967,8 @@ export class CodeGenerator {
|
||||
const props: string[] = [];
|
||||
let hasSlotsProp = false;
|
||||
for (let p in ast.props) {
|
||||
props.push(`${p}: ${this.captureExpression(ast.props[p]) || undefined}`);
|
||||
const propName = p.includes("-") ? `'${p}'` : p;
|
||||
props.push(`${propName}: ${this.captureExpression(ast.props[p]) || undefined}`);
|
||||
if (p === "slots") {
|
||||
hasSlotsProp = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user