Skip to content

Commit

Permalink
rf
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishiv committed Oct 17, 2024
1 parent d039776 commit 271256f
Show file tree
Hide file tree
Showing 3 changed files with 3 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.15",
"version": "1.3.16",
"author": "Abhishiv Saxena<abhishiv@gmail.com>",
"license": "MIT",
"description": "Fine-grained reactive library with no compiler, no magic, and no virtual DOM",
Expand Down
2 changes: 1 addition & 1 deletion src/dom/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const getDescendants = (node: TreeStep): TreeStep[] => {
},
{
kids: (parent) => {
return Array.isArray(parent.k) ? parent.k : [];
return [...(Array.isArray(parent.k) ? parent.k : [])];
},
order: "post",
}
Expand Down
4 changes: 1 addition & 3 deletions src/utils/crawl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ export const crawl = <T>(
iterate: (node: T) => void,
options: { order: "post"; kids: (node: T) => T[] }
) => {
if (options.order === "post") {
dfsPostOrder(root, iterate, options.kids);
}
dfsPostOrder(root, iterate, options.kids);
};

// Helper function for dfsPostOrder.
Expand Down

0 comments on commit 271256f

Please sign in to comment.