diff options
| author | OpportunityLiu <[email protected]> | 2019-08-18 11:01:11 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-08-18 11:01:11 +0800 |
| commit | bd4181e0321ec9db4dd6b304db51f5cf6566a484 (patch) | |
| tree | b49394661566d431fc2403d1b3142ddad0109364 | |
| parent | f23e65985ef61f264df15ff40277d16f35789b4d (diff) | |
fix map
| -rw-r--r-- | xmake/core/base/table.lua | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/xmake/core/base/table.lua b/xmake/core/base/table.lua index 1917d827a..c08526c34 100644 --- a/xmake/core/base/table.lua +++ b/xmake/core/base/table.lua @@ -313,9 +313,7 @@ end function table.map(tab, mapper) assert(tab) - if mapper == nil then - return table.copy(tab) - end + assert(mapper) local newtab = {} for k, v in pairs(tab) do @@ -328,9 +326,7 @@ end function table.imap(arr, mapper) assert(arr) - if mapper == nil then - return table.copy(arr) - end + assert(mapper) local newarr = {} for k, v in ipairs(arr) do |
