better fix for check nil
* close https://notabug.org/TenPlus1/mobs_redo/issues/114 * close https://codeberg.org/minenux/minetest-mod-mobs_redo/issues/107
This commit is contained in:
parent
1921a03b45
commit
a45f91c512
4
api.lua
4
api.lua
@ -270,6 +270,8 @@ local check_for = function(look_for, look_inside)
|
||||
|
||||
for _, str in pairs(look_inside) do
|
||||
|
||||
if not str then goto continue end
|
||||
|
||||
if str == look_for then
|
||||
return true
|
||||
end
|
||||
@ -282,6 +284,8 @@ local check_for = function(look_for, look_inside)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
::continue::
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user