mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] qweb: fix crash when component only renders empty slot
This commit is contained in:
committed by
Aaron Bohy
parent
c03042b44d
commit
7ffb9afbd9
@@ -1332,4 +1332,19 @@ describe("slots", () => {
|
||||
|
||||
expect(fixture.innerHTML).toBe("<div><div><p>Ablip</p><div><p>Bblip</p></div></div></div>");
|
||||
});
|
||||
|
||||
test("can render only empty slot", async () => {
|
||||
class Parent extends Component {
|
||||
static template = xml`<t t-slot="default"/>`;
|
||||
}
|
||||
|
||||
let error = null;
|
||||
try {
|
||||
await mount(Parent, fixture);
|
||||
} catch (e) {
|
||||
error = e;
|
||||
}
|
||||
expect(error).toBeNull();
|
||||
expect(fixture.innerHTML).toEqual("");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user