From de752768cf8eac363b4fb02501286234af37592c Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Sat, 25 Nov 2023 19:58:52 +0800 Subject: [PATCH] fix: add nil check to `get_cwd` --- lua/nvim-tree/core.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-tree/core.lua b/lua/nvim-tree/core.lua index a109c995aba..251cb059915 100644 --- a/lua/nvim-tree/core.lua +++ b/lua/nvim-tree/core.lua @@ -28,7 +28,7 @@ function M.get_explorer() end function M.get_cwd() - return TreeExplorer.absolute_path + return TreeExplorer and TreeExplorer.absolute_path end function M.get_nodes_starting_line()