summaryrefslogtreecommitdiff
path: root/xmake/core/base/table.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/base/table.lua')
-rw-r--r--xmake/core/base/table.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua
index 1f7576870..a8050f0a3 100644
--- a/xmake/core/base/table.lua
+++ b/xmake/core/base/table.lua
@@ -429,6 +429,7 @@ end
-- get order keys of a table
function table.orderkeys(tbl, callback)
+ local callback = type(callback) == "function" and callback or nil
local keys = table.keys(tbl)
table.sort(keys, callback)
return keys