Optimize isempty function using next()

This commit is contained in:
Brues
2026-07-20 18:46:09 -05:00
parent dfa74c5756
commit e28a7e5606
+1 -5
View File
@@ -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 ]