From 85a605758c47eaa92b0a22b028cc4896eceeaf3f Mon Sep 17 00:00:00 2001 From: A2va <49582555+A2va@users.noreply.github.com> Date: Sun, 1 Oct 2023 11:17:08 +0200 Subject: Check callback type --- xmake/core/base/table.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'xmake/core/base/table.lua') 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 -- cgit v1.3.1