Skip to content

Commit

Permalink
Remove ipairs from for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
hy2k committed Dec 1, 2023
1 parent b56491d commit de5b6eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Components/ComponentTree/Component/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ local function Component(props: Props)
end

local isEmpty = true
for _, descendant in ipairs(getTreeDescendants(props.node)) do
for _, descendant in getTreeDescendants(props.node) do
if descendant.name:lower():match(props.filter:lower()) then
isEmpty = false
break
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/getTreeDescendants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local function getTreeDescendants(root: types.ComponentTreeNode): { types.Compon
table.insert(descendants, node)
end

for _, child in ipairs(node.children) do
for _, child in node.children do
traverse(child, false)
end
end
Expand Down

0 comments on commit de5b6eb

Please sign in to comment.