diff --git a/lua/nvim-tree/explorer/node.lua b/lua/nvim-tree/explorer/node.lua index 6e58771e73b..5657826f10c 100644 --- a/lua/nvim-tree/explorer/node.lua +++ b/lua/nvim-tree/explorer/node.lua @@ -29,7 +29,7 @@ end ---@param absolute_path string ---@return GitStatus local function get_git_status(parent_ignored, status, absolute_path) - local file_status = parent_ignored and "!!" or status.files and status.files[absolute_path] + local file_status = parent_ignored and "!!" or (status and status.files and status.files[absolute_path]) return { file = file_status } end