mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] blockdom: ignore attributes with undefined value
This commit is contained in:
committed by
Aaron Bohy
parent
14a6289f60
commit
63fbcf99fd
@@ -52,6 +52,18 @@ describe("attributes", () => {
|
||||
expect(result).toBe(`<div></div>`);
|
||||
});
|
||||
|
||||
test("dynamic undefined generic attribute", () => {
|
||||
const template = `<div t-att-thing="c"/>`;
|
||||
const result = renderToString(template, { c: undefined });
|
||||
expect(result).toBe(`<div></div>`);
|
||||
});
|
||||
|
||||
test("dynamic undefined class attribute", () => {
|
||||
const template = `<div t-att-class="c"/>`;
|
||||
const result = renderToString(template, { c: undefined });
|
||||
expect(result).toBe(`<div></div>`);
|
||||
});
|
||||
|
||||
test("dynamic attribute with a dash", () => {
|
||||
const template = `<div t-att-data-action-id="id"/>`;
|
||||
const result = renderToString(template, { id: 32 });
|
||||
|
||||
Reference in New Issue
Block a user