From e28a7e5606ede341be37b9a763a41741c7b3e959 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Mon, 20 Jul 2026 18:46:09 -0500 Subject: [PATCH] Optimize isempty function using next() --- api/api.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/api/api.lua b/api/api.lua index 26c9092d..7f603b5b 100644 --- a/api/api.lua +++ b/api/api.lua @@ -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 ]