feat: it works boiiii

pull/10320/head
S. Elliott Johnson 2 years ago
parent 3756ce5a4f
commit 243ba9c033

@ -2450,7 +2450,7 @@ export const template_visitors = {
node.context.elements.forEach((element, i) => { node.context.elements.forEach((element, i) => {
if (!element) return; if (!element) return;
const id = element.type === 'Identifier' ? element : b.id(`$$context${i}`); const id = element.type === 'Identifier' ? element : b.id(`$$arg${i}`);
args.push(id); args.push(id);
if (element.type === 'Identifier') { if (element.type === 'Identifier') {

@ -1437,9 +1437,9 @@ const template_visitors = {
// TODO hoist where possible // TODO hoist where possible
/** @type {import('estree').Pattern[]} */ /** @type {import('estree').Pattern[]} */
const args = [b.id('$$payload')]; const args = [b.id('$$payload')];
if (node.context) { node.context.elements.forEach((arg) => {
args.push(node.context); if (arg) args.push(arg);
} });
context.state.init.push( context.state.init.push(
b.function_declaration( b.function_declaration(

Loading…
Cancel
Save