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
Géry Debongnie
parent
ba7c9063c0
commit
6e9b68dafa
@@ -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