Work Table : fix crash when mod name is not declared in table and one of its node is put
This commit is contained in:
parent
714e9cfddf
commit
11872bda9b
@ -97,8 +97,10 @@ function worktable.dig(pos, _)
|
||||
end
|
||||
|
||||
function worktable.contains(table, element)
|
||||
for _, value in pairs(table) do
|
||||
if value == element then return true end
|
||||
if table then
|
||||
for _, value in pairs(table) do
|
||||
if value == element then return true end
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user