mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] t-call-context: fix capture making component available in ctx
Previously, when using a component with a slot within a t-call with t-call-context, the component would become available again inside the slot despite the t-call-context. This was caused by the fact that the capture helper function creates an object with the component as its prototype which is incorrect. It should just use the previous context as its prototype.
This commit is contained in:
committed by
Géry Debongnie
parent
39329f80b2
commit
3d40533de1
@@ -401,7 +401,7 @@ exports[`t-on t-on on t-set-slots 1`] = `
|
||||
const b2 = text(\` [\`);
|
||||
const b3 = text(ctx['state'].count);
|
||||
const b4 = text(\`] \`);
|
||||
const ctx1 = capture(ctx, this);
|
||||
const ctx1 = capture(ctx);
|
||||
const b8 = comp1({slots: markRaw({'myslot': {__render: slot1.bind(this), __ctx: ctx1}})}, key + \`__1\`, node, this, null);
|
||||
return multi([b2, b3, b4, b8]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user