fix(#1270): ensure explorer exists at startup before propagating FS changes

This commit is contained in:
Alexander Courtis 2022-10-15 12:44:59 +11:00
parent 187388b7f5
commit 55aa0062b9

View File

@ -117,6 +117,12 @@ end
-- (grouped or hidden too)
function M.get_node_from_path(path)
local explorer = require("nvim-tree.core").get_explorer()
-- tree may not yet be loaded
if not explorer then
return
end
if explorer.absolute_path == path then
return explorer
end