diff options
| author | ruki <[email protected]> | 2025-09-23 00:43:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-09-23 00:43:26 +0800 |
| commit | bf906566d8a9f69f09a6c0f20a9da30e3555d338 (patch) | |
| tree | 711661336203123ecb65feaba2602c54b7151d53 /xmake/core/base/table.lua | |
| parent | 7dabd19751248074ccfaf470e9b7eb5f1a57ca9b (diff) | |
improve table.empty
Diffstat (limited to 'xmake/core/base/table.lua')
| -rw-r--r-- | xmake/core/base/table.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua index 39e04596d..45cb4f23d 100644 --- a/xmake/core/base/table.lua +++ b/xmake/core/base/table.lua @@ -533,7 +533,7 @@ end -- is empty table? function table.empty(tbl) - return type(tbl) == "table" and #tbl == 0 and #table.keys(tbl) == 0 + return type(tbl) == "table" and next(tbl) == nil end -- return indices or keys for the given value |
