mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] component: issue with t-slot,t-set,t-value, but no t-foreach
closes #232
This commit is contained in:
@@ -590,8 +590,13 @@ QWeb.addDirective({
|
||||
}
|
||||
}
|
||||
|
||||
const scopeVars =
|
||||
hasSlots && ctx.scopeVars.length ? `Object.assign({}, scope), {${varDefs.join(",")}}` : "";
|
||||
let scopeVars = "";
|
||||
if (hasSlots) {
|
||||
scopeVars += ctx.scopeVars.length ? `Object.assign({}, scope)` : varDefs.length ? `{}` : "";
|
||||
if (varDefs.length) {
|
||||
scopeVars += `, {${varDefs.join(",")}}`;
|
||||
}
|
||||
}
|
||||
ctx.addLine(`def${defID} = w${componentID}.__prepare(${scopeVars});`);
|
||||
// hack: specify empty remove hook to prevent the node from being removed from the DOM
|
||||
ctx.addLine(
|
||||
|
||||
Reference in New Issue
Block a user