Skip to content

Commit

Permalink
v1.3.18
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishiv committed Oct 17, 2024
1 parent e77a1ff commit 39108a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alfama",
"version": "1.3.17",
"version": "1.3.18",
"author": "Abhishiv Saxena<[email protected]>",
"license": "MIT",
"description": "Fine-grained reactive library with no compiler, no magic, and no virtual DOM",
Expand Down
8 changes: 4 additions & 4 deletions src/stdlib/Each/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const Each: <T extends ArrayOrObject>(
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,
Expand All @@ -110,7 +110,7 @@ export const Each: <T extends ArrayOrObject>(
// 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,
Expand Down Expand Up @@ -152,7 +152,7 @@ export const Each: <T extends ArrayOrObject>(
items.forEach((item, i) => {
const index = startIndex + i;
const previousChildren = [...(pStep.k || [])];
const { treeStep, el } = renderArray(
const [treeStep, el] = renderArray(
pStep,
props.renderItem,
listCursor,
Expand Down Expand Up @@ -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];
};

0 comments on commit 39108a4

Please sign in to comment.