summaryrefslogtreecommitdiff
path: root/xmake/modules/private/utils/complete.lua
diff options
context:
space:
mode:
authorOpportunity <[email protected]>2020-05-22 11:55:24 +0800
committerOpportunity <[email protected]>2020-05-22 11:55:24 +0800
commitbc3e8bfc6fa89bdd94a552e2ad5738d781986d4f (patch)
tree90f637179d2744a3c12a4a087e56f913ff692a2e /xmake/modules/private/utils/complete.lua
parent56b9da92314ae31c2fb53504b2345114aeb8b3f6 (diff)
fix autocomplete kv
Diffstat (limited to 'xmake/modules/private/utils/complete.lua')
-rw-r--r--xmake/modules/private/utils/complete.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/modules/private/utils/complete.lua b/xmake/modules/private/utils/complete.lua
index 10c9e7d66..a50bc907a 100644
--- a/xmake/modules/private/utils/complete.lua
+++ b/xmake/modules/private/utils/complete.lua
@@ -43,6 +43,11 @@ function _print_candidate(is_complate, ...)
end
function _find_candidates(candidates, find)
+
+ if type(candidates) ~= 'table' then
+ return {}
+ end
+
local has_candidate = false
local results = table.new(#candidates, 0)