[FIX] slots: properly bind this in t-on arrow functions

This commit is contained in:
Géry Debongnie
2021-11-25 13:56:56 +01:00
committed by Aaron Bohy
parent 05a57d6da5
commit 2601a176c4
9 changed files with 283 additions and 150 deletions
+3 -3
View File
@@ -18,7 +18,7 @@ exports[`Memo if no prop change, prevent renderings from above 2`] = `
let { text, createBlock, list, multi, html, toggler, component } = bdom;
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
const slot1 = (ctx, node, key) => {
function slot1(ctx, node, key) {
let b6 = text(ctx['state'].a);
let b7 = text(ctx['state'].b);
let b8 = text(ctx['state'].c);
@@ -53,7 +53,7 @@ exports[`Memo if no props, prevent renderings from above 2`] = `
let { text, createBlock, list, multi, html, toggler, component } = bdom;
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
const slot2 = (ctx, node, key) => {
function slot2(ctx, node, key) {
return component(\`Child\`, {value: ctx['state'].value}, key + \`__3\`, node, ctx);
}
@@ -71,7 +71,7 @@ exports[`Memo if no props, prevent renderings from above (work with simple html)
let { text, createBlock, list, multi, html, toggler, component } = bdom;
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
const slot1 = (ctx, node, key) => {
function slot1(ctx, node, key) {
return text(ctx['state'].value);
}