summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/private/utils/completer.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/modules/private/utils/completer.lua b/xmake/modules/private/utils/completer.lua
index 7688afc4e..e4427bc87 100644
--- a/xmake/modules/private/utils/completer.lua
+++ b/xmake/modules/private/utils/completer.lua
@@ -229,7 +229,9 @@ function completer:_complete_option_v(options, current, completing)
end
-- get completion candidates from values option
local function _values_into_candidates(values)
- if type(values) == "function" then
+ if values == nil then
+ return {}
+ elseif type(values) == "function" then
-- no need to filter result of values() as we consider values() already filter candidates
return _transform_values(values(completing, current))
else