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
@@ -18,7 +18,7 @@ function callSlot(
|
||||
name: string,
|
||||
defaultSlot?: (ctx: any, key: string) => BDom,
|
||||
dynamic?: boolean
|
||||
): BDom | null {
|
||||
): BDom {
|
||||
const slots = ctx.__owl__.slots;
|
||||
const slotFn = slots[name];
|
||||
const slotBDom = slotFn ? slotFn(parent, key) : null;
|
||||
@@ -33,7 +33,7 @@ function callSlot(
|
||||
}
|
||||
return multi([child1, child2]);
|
||||
}
|
||||
return slotBDom;
|
||||
return slotBDom || text("");
|
||||
}
|
||||
|
||||
function capture(ctx: any): any {
|
||||
|
||||
Reference in New Issue
Block a user