summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/table.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua
index a360f7b42..84caf1bfa 100644
--- a/xmake/core/base/table.lua
+++ b/xmake/core/base/table.lua
@@ -440,6 +440,9 @@ end
-- TODO
-- end
function table.orderpairs(t)
+ if type(t) ~= "table" then
+ t = t ~= nil and {t} or {}
+ end
local orderkeys = table.orderkeys(t)
local i = 1
return function (t, k)