summaryrefslogtreecommitdiff
path: root/xmake/core/base/table.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-03-02 23:20:48 +0800
committerruki <[email protected]>2022-03-02 23:20:48 +0800
commitcfdffbc896a2999c594caccfdaa323df16e3950b (patch)
tree233d14b1ac1e8c918b0d1e23aa76f87b06e4e69e /xmake/core/base/table.lua
parent6026401e3bc55e0b5974c0aa18aefe4d7135fe89 (diff)
improve table.wrap and unwrap
Diffstat (limited to 'xmake/core/base/table.lua')
-rw-r--r--xmake/core/base/table.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua
index 1c19f588d..73556c9fc 100644
--- a/xmake/core/base/table.lua
+++ b/xmake/core/base/table.lua
@@ -310,7 +310,7 @@ end
-- unwrap object if be only one
function table.unwrap(object)
- if type(object) == "table" then
+ if type(object) == "table" and not getmetatable(object) then
if #object == 1 then
return object[1]
end