mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] qweb: cascading t-call and t-raw="0"
Have a t-call having a t-raw="0" that call is made to a template of the same form i.e. itself as a t-call t-raw="0" structure Before this commit, there was recursion crash This was because the caller to which a t-raw="0" referred to was incorrect. The caller here is the node which makes the t-call. In particular, the caller was always set to last caller of the context After this commit, there is no crash and this imbrication of t-call and t-raw="0" is well rendered. To sum up, we count the recursive calls to t-raw="0" and fetch the caller in the context accordingly closes #510
This commit is contained in:
committed by
Géry Debongnie
parent
6e5d6aa226
commit
7f6782d009
@@ -28,9 +28,12 @@ QWeb.utils.getFragment = function(str: string): DocumentFragment {
|
||||
QWeb.utils.htmlToVDOM = htmlToVDOM;
|
||||
|
||||
function compileValueNode(value: any, node: Element, qweb: QWeb, ctx: CompilationContext) {
|
||||
if (value === "0" && ctx.caller) {
|
||||
qweb._compileNode(ctx.caller, ctx);
|
||||
return;
|
||||
if (value === "0") {
|
||||
const caller = ctx.getCaller();
|
||||
if (caller) {
|
||||
qweb._compileNode(caller, ctx.getInliningContext());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (value.xml instanceof NodeList && !value.id) {
|
||||
|
||||
Reference in New Issue
Block a user