fix: nil access exception with git integration when changing branches (#2774)
Fix nil access exception appearing when changing branches
This commit is contained in:
parent
edd4e25fd4
commit
340d3a9795
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user