From 39108a41b31991dd3b687cca8f4e914eabb2632f Mon Sep 17 00:00:00 2001 From: Abhishiv Saxena Date: Fri, 18 Oct 2024 00:42:47 +0530 Subject: [PATCH] v1.3.18 --- package.json | 2 +- src/stdlib/Each/index.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 8489aa5..6c51395 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "alfama", - "version": "1.3.17", + "version": "1.3.18", "author": "Abhishiv Saxena", "license": "MIT", "description": "Fine-grained reactive library with no compiler, no magic, and no virtual DOM", diff --git a/src/stdlib/Each/index.tsx b/src/stdlib/Each/index.tsx index 666730d..14de41f 100644 --- a/src/stdlib/Each/index.tsx +++ b/src/stdlib/Each/index.tsx @@ -84,7 +84,7 @@ export const Each: ( const startIndex = 0; (value as typeof props.cursor).forEach((item, index) => { const previousChildren = [...(pStep.k || [])]; - const { treeStep, el } = renderArray( + const [treeStep, el] = renderArray( pStep, props.renderItem, listCursor, @@ -110,7 +110,7 @@ export const Each: ( // console.log("data", data); data.args.forEach((arg, i) => { const index = previousChildren.length + i; - const { treeStep, el } = renderArray( + const [treeStep, el] = renderArray( pStep, props.renderItem, listCursor, @@ -152,7 +152,7 @@ export const Each: ( items.forEach((item, i) => { const index = startIndex + i; const previousChildren = [...(pStep.k || [])]; - const { treeStep, el } = renderArray( + const [treeStep, el] = renderArray( pStep, props.renderItem, listCursor, @@ -198,5 +198,5 @@ const renderArray = ( // console.log(getCursor(cursor)); const vEl = renderItem(getItemCursor.bind(null, list[index]), index); const treeStep = getTreeStep(parentStep, undefined, vEl); - return { treeStep, el: vEl }; + return [treeStep, vEl]; };