Skip to content

Commit aa161a0

Browse files
committed
chore: resolve undefined-field
1 parent c883df9 commit aa161a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/nvim-tree/actions/tree/modifiers/collapse-all.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ function M.fn(keep_buffers)
4646
end
4747
end)
4848
:recursor(function(n)
49-
return n.group_next and { n.group_next } or n.nodes
49+
n = n and n:as(DirectoryNode)
50+
return n and (n.group_next and { n.group_next } or n.nodes)
5051
end)
5152
:iterate()
5253

0 commit comments

Comments
 (0)