From eef548627ce93ecdcef0bec669cb6abc444ebd6a Mon Sep 17 00:00:00 2001 From: Mark Huggins Date: Thu, 14 Nov 2024 10:27:54 -0500 Subject: [PATCH] fix(pr create): Guard against nil Better nil guard check. fixes #678 --- lua/octo/ui/writers.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/octo/ui/writers.lua b/lua/octo/ui/writers.lua index 064043ce..fb38690a 100644 --- a/lua/octo/ui/writers.lua +++ b/lua/octo/ui/writers.lua @@ -491,7 +491,7 @@ function M.write_details(bufnr, issue, update) table.insert(details, merge_state_vt) end - if not issue.merged and issue.autoMergeRequest ~= vim.NIL then + if not issue.merged and issue.autoMergeRequest ~= vim.NIL and issue.autoMergeRequest ~= nil then local auto_merge_vt = { { "Auto-merge: ", "OctoDetailsLabel" }, { "ENABLED", "OctoStateApproved" },