From b7a1a0fbaf1bd0f394783951f16d4c9f8c9dc210 Mon Sep 17 00:00:00 2001 From: futsuuu <105504350+futsuuu@users.noreply.github.com> Date: Sun, 16 Apr 2023 05:54:10 +0900 Subject: [PATCH] fix(render): show message if not yet committed (#707) * fix(render): show message if not yet committed * fix(render): show commit only if it can be shown --- lua/lazy/view/render.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazy/view/render.lua b/lua/lazy/view/render.lua index 91b8756..36e1f96 100644 --- a/lua/lazy/view/render.lua +++ b/lua/lazy/view/render.lua @@ -499,7 +499,9 @@ function M:details(plugin) if git.branch then table.insert(props, { "branch", git.branch }) end - table.insert(props, { "commit", git.commit:sub(1, 7), "LazyCommit" }) + if git.commit then + table.insert(props, { "commit", git.commit:sub(1, 7), "LazyCommit" }) + end end if Util.file_exists(plugin.dir .. "/README.md") then table.insert(props, { "readme", "README.md" })