made sure it checks if dev.extra_paths is a table before iterating over it

This commit is contained in:
BirdeeHub 2024-01-06 00:14:54 -08:00
commit 1d08c7a284

View file

@ -220,8 +220,10 @@ function M.setup(opts)
-- normalize path options -- normalize path options
local normalized_extra_dev_paths local normalized_extra_dev_paths
for k, path in ipairs(M.options.dev.extra_paths) do if type(M.options.dev.extra_paths) == "table" then
table.insert(normalized_extra_dev_paths, k, Util.norm(path)) for k, path in ipairs(M.options.dev.extra_paths) do
table.insert(normalized_extra_dev_paths, k, Util.norm(path))
end
end end
M.options.dev.extra_paths = normalized_extra_dev_paths M.options.dev.extra_paths = normalized_extra_dev_paths
M.options.performance.rtp.custom_config_dir = Util.norm(M.options.performance.rtp.custom_config_dir) M.options.performance.rtp.custom_config_dir = Util.norm(M.options.performance.rtp.custom_config_dir)