Most efficient way to determine if a Lua table is empty (contains no entries) (c)
The correct code is
if next(myTable) == nil then -- myTable is empty end
or maximum efficiency you'll want to bind next to a local variable, e.g.,
... local next = next ... if next(...) ...
(c) Stackoverflow
sdmrnv, 2018-12-02 [0.459ms, s]