mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] compiler: scope generated ids to their prefix
This means that unrelated ids (eg the id of a template, variable or key) not longer share the same incrementing counter, meaning that you no longer see a variable named "v2" unless another variable "v1" was generated previously, this is also true for block data.
This commit is contained in:
committed by
Aaron Bohy
parent
c7af885f43
commit
9f2e2bcc66
@@ -20,7 +20,7 @@ exports[`calling render in destroy 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const tKey_1 = ctx['key'];
|
||||
return toggler(tKey_1, component(\`B\`, {fromA: ctx['state']}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
return toggler(tKey_1, component(\`B\`, {fromA: ctx['state']}, tKey_1 + key + \`__1\`, node, ctx));
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -1154,7 +1154,7 @@ exports[`two renderings initiated between willPatch and patched 1`] = `
|
||||
let b2;
|
||||
if (ctx['state'].flag) {
|
||||
const tKey_1 = 'panel_'+ctx['state'].panel;
|
||||
b2 = toggler(tKey_1, component(\`Panel\`, {val: ctx['state'].panel}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
b2 = toggler(tKey_1, component(\`Panel\`, {val: ctx['state'].panel}, tKey_1 + key + \`__1\`, node, ctx));
|
||||
}
|
||||
return block1([], [b2]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user