mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] qweb: fix crash with ref an component in same slot
This commit is contained in:
committed by
Géry Debongnie
parent
c718d8e6c6
commit
3e70b17da1
@@ -1347,4 +1347,22 @@ describe("slots", () => {
|
||||
expect(error).toBeNull();
|
||||
expect(fixture.innerHTML).toEqual("");
|
||||
});
|
||||
|
||||
test("can render node with t-ref and Component in same slot", async () => {
|
||||
class Child extends Component {
|
||||
static template = xml`<t t-slot="default"/>`;
|
||||
}
|
||||
|
||||
class Parent extends Component {
|
||||
static template = xml`<Child><div t-ref="div"/><Child/></Child>`;
|
||||
static components = { Child };
|
||||
}
|
||||
let error = null;
|
||||
try {
|
||||
await mount(Parent, fixture);
|
||||
} catch (e) {
|
||||
error = e;
|
||||
}
|
||||
expect(error).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user