diff --git a/lua/nvim-tree/explorer/node.lua b/lua/nvim-tree/explorer/node.lua index 3d0119be..3a84e6e7 100644 --- a/lua/nvim-tree/explorer/node.lua +++ b/lua/nvim-tree/explorer/node.lua @@ -14,13 +14,15 @@ local function get_dir_git_status(parent_ignored, status, absolute_path) return { file = "!!" } end - return { - file = status.files and status.files[absolute_path], - dir = status.dirs and { - direct = status.dirs.direct[absolute_path], - indirect = status.dirs.indirect[absolute_path], - }, - } + if status then + return { + file = status.files and status.files[absolute_path], + dir = status.dirs and { + direct = status.dirs.direct[absolute_path], + indirect = status.dirs.indirect[absolute_path], + }, + } + end end local function get_git_status(parent_ignored, status, absolute_path)