Skip to content

Commit 3de5a7b

Browse files
committed
fix: handle nil lines in async git status, fixes #187
1 parent 80f734f commit 3de5a7b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lua/neo-tree/git/status.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ local function get_priority_git_status_code(status, other_status)
5151
end
5252

5353
local parse_git_status_line = function(context, line)
54+
if type(line) ~= "string" then
55+
return
56+
end
57+
if #line < 4 then
58+
return
59+
end
5460
local git_root = context.git_root
5561
local git_status = context.git_status
5662
local exclude_directories = context.exclude_directories

0 commit comments

Comments
 (0)