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
@@ -16,6 +16,12 @@ describe("t-if", () => {
|
||||
expect(renderToString(template, {})).toBe("<div></div>");
|
||||
});
|
||||
|
||||
test("t-if with empty content", () => {
|
||||
const template = `hello<t t-if="condition"/>`;
|
||||
expect(renderToString(template, { condition: true })).toBe("hello");
|
||||
expect(renderToString(template, { condition: false })).toBe("hello");
|
||||
});
|
||||
|
||||
test("boolean value condition missing", () => {
|
||||
const template = `<span><t t-if="condition">fail</t></span>`;
|
||||
expect(renderToString(template)).toBe("<span></span>");
|
||||
|
||||
Reference in New Issue
Block a user