Skip to content

Commit cf90837

Browse files
authored
fix(#1740): Error while running :NvimTreeCollapseKeepBuffers (#1741)
1 parent f1f89f2 commit cf90837

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ function M.fn(keep_buffers)
3131
Iterator.builder(core.get_explorer().nodes)
3232
:hidden()
3333
:applier(function(node)
34-
node.open = keep_buffers == true and matches(node.absolute_path)
34+
if node.nodes ~= nil then
35+
node.open = keep_buffers == true and matches(node.absolute_path)
36+
end
3537
end)
3638
:recursor(function(n)
3739
return n.nodes

0 commit comments

Comments
 (0)