mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 11:10:00 +00:00
Optimize isempty function using next()
This commit is contained in:
+1
-5
@@ -102,11 +102,7 @@ end
|
||||
-- 'tbl' [table] the table that shall be checked
|
||||
-- return: [boolean] result of the check.
|
||||
function pfUI.api.isempty(tbl)
|
||||
if not tbl then return true end
|
||||
for k, v in pairs(tbl) do
|
||||
return false
|
||||
end
|
||||
return true
|
||||
return next(tbl or {}) == nil
|
||||
end
|
||||
|
||||
-- [ checkversion ]
|
||||
|
||||
Reference in New Issue
Block a user