mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Optimize loveframes.util.TableHasKey
This commit is contained in:
parent
838ac1c85c
commit
19087a7303
@ -276,13 +276,7 @@ end
|
||||
--]]---------------------------------------------------------
|
||||
function loveframes.util.TableHasKey(table, key)
|
||||
|
||||
for k, v in pairs(table) do
|
||||
if k == key then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
return table[key] ~= nil
|
||||
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user