fix: add nil check

This commit is contained in:
Jakub F. Bortlík
2026-02-26 21:53:34 +01:00
parent 5069212993
commit d7ddf1cb5f

View File

@@ -169,9 +169,13 @@ M.build_info_lines = function()
if v == "merge_status" then
v = "detailed_merge_status"
end -- merge_status was deprecated, see https://gitlab.com/gitlab-org/gitlab/-/issues/3169#note_1162532204
local title = options[v].title
if string.len(title) > string.len(longest_used) then
longest_used = title
if options[v] == nil then
u.notify(string.format("Invalid field in settings.info.fields: '%s'", v), vim.log.levels.ERROR)
else
local title = options[v].title
if string.len(title) > string.len(longest_used) then
longest_used = title
end
end
end