Skip to content

Commit

Permalink
#274 fixed (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
nem0 authored Sep 20, 2023
1 parent 0e26dba commit 7f00dcb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
16 changes: 10 additions & 6 deletions src/base/bake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,19 @@
end
end

local function removevalues(tbl, removes)
local function removevalues(tbl, removes)
for i = #tbl, 1, -1 do
for _, pattern in ipairs(removes) do
if pattern == tbl[i] then
table.remove(tbl, k)
end
end
end

for k, v in pairs(tbl) do
for _, pattern in ipairs(removes) do
if pattern == tbl[k] then
if type(k) == "number" then
table.remove(tbl, k)
else
tbl[k] = nil
end
tbl[k] = nil
break
end
end
Expand Down
Loading

0 comments on commit 7f00dcb

Please sign in to comment.