fix: check tree exists before hijacking buffer dir

fixes #934
This commit is contained in:
kiyan
2022-02-06 18:54:57 +01:00
parent b76602182f
commit 0573c68fd7

View File

@@ -184,7 +184,7 @@ function M.open_on_directory()
end
view.close()
if bufname ~= lib.Tree.cwd then
if lib.Tree and bufname ~= lib.Tree.cwd then
ChangeDir.fn(bufname)
end
M.hijack_current_window()