Skip to content

Commit 55aa006

Browse files
committed
fix(#1270): ensure explorer exists at startup before propagating FS changes
1 parent 187388b commit 55aa006

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lua/nvim-tree/utils.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ end
117117
-- (grouped or hidden too)
118118
function M.get_node_from_path(path)
119119
local explorer = require("nvim-tree.core").get_explorer()
120+
121+
-- tree may not yet be loaded
122+
if not explorer then
123+
return
124+
end
125+
120126
if explorer.absolute_path == path then
121127
return explorer
122128
end

0 commit comments

Comments
 (0)