From d7ddf1cb5f7abf991a18f1c55da2ae0245f7574d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20F=2E=20Bortl=C3=ADk?= Date: Thu, 26 Feb 2026 21:53:34 +0100 Subject: [PATCH] fix: add nil check --- lua/gitlab/actions/summary.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lua/gitlab/actions/summary.lua b/lua/gitlab/actions/summary.lua index 778f85d..dc67220 100644 --- a/lua/gitlab/actions/summary.lua +++ b/lua/gitlab/actions/summary.lua @@ -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