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