From ca9900c31ee6e254a0ba7011ba49f48ebf4c8db2 Mon Sep 17 00:00:00 2001 From: Matthias Bilger Date: Thu, 4 Apr 2024 14:42:31 +0200 Subject: [PATCH] fix: error message outside of git repo (#116) in case ignored branches have been set and the current dir is not a git directory no more error messages will be thrown --- lua/persisted/utils.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/persisted/utils.lua b/lua/persisted/utils.lua index 0cab082..de7de04 100644 --- a/lua/persisted/utils.lua +++ b/lua/persisted/utils.lua @@ -92,6 +92,9 @@ end ---@param heystack table ---@return boolean function M.table_match(needle, heystack, escape_fct) + if needle == nil then + return false + end return heystack and next(vim.tbl_filter(function(pattern) if pattern.exact then