Skip to content

Commit 2f18543

Browse files
committed
fix(node): correctly calling expand on parent without circular dependency
1 parent 2b8623e commit 2f18543

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

lua/nvim-tree/node/init.lua

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,8 @@ end
146146

147147
---@param expand_opts ApiTreeExpandOpts?
148148
function Node:expand(expand_opts)
149-
local DirectoryNode = require("nvim-tree.node.directory")
150-
local FileNode = require("nvim-tree.node.file")
151-
152-
if self:is(FileNode) then
149+
if self.parent then
153150
self.parent:expand(expand_opts)
154-
else
155-
self:as(DirectoryNode).expand_opts(expand_opts)
156151
end
157152
end
158153

0 commit comments

Comments
 (0)