We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0780bf6 commit e02cc46Copy full SHA for e02cc46
lua/spectre/state_utils.lua
@@ -58,9 +58,12 @@ end
58
59
local get_options = function(cfg)
60
local options_value = {}
61
- for key, value in pairs(state.options) do
62
- if value and cfg.options[key] ~= nil then
63
- table.insert(options_value, cfg.options[key].value)
+ -- Check if cfg.options exists before trying to iterate through it
+ if cfg.options then
+ for key, value in pairs(state.options) do
64
+ if value and cfg.options[key] ~= nil then
65
+ table.insert(options_value, cfg.options[key].value)
66
+ end
67
end
68
69
return options_value
0 commit comments