Skip to content

Commit

Permalink
fix: nil access exception with git integration when changing branches (
Browse files Browse the repository at this point in the history
…#2774)

Fix nil access exception appearing when changing branches
  • Loading branch information
jacobkania authored May 14, 2024
1 parent edd4e25 commit 340d3a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/nvim-tree/explorer/node.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 340d3a9

Please sign in to comment.