mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] compiler: allow t-if with empty content
This commit is contained in:
committed by
Aaron Bohy
parent
49c7585998
commit
2e176f135d
@@ -395,6 +395,19 @@ describe("qweb parser", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("t-if with empty content", async () => {
|
||||
expect(parse(`<t t-if="condition"></t>`)).toEqual({
|
||||
type: ASTType.TIf,
|
||||
condition: "condition",
|
||||
content: {
|
||||
type: ASTType.Text,
|
||||
value: "",
|
||||
},
|
||||
tElif: null,
|
||||
tElse: null,
|
||||
});
|
||||
});
|
||||
|
||||
test("t-if (on dom node", async () => {
|
||||
expect(parse(`<div t-if="condition">hey</div>`)).toEqual({
|
||||
type: ASTType.TIf,
|
||||
|
||||
Reference in New Issue
Block a user