Skip to content

Commit b6e23dc

Browse files
committed
refactor(#3255): ensure all args passed to api
1 parent 15a3487 commit b6e23dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/nvim-tree/api/impl/post.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ local function en(fn)
4646
return function(n, ...)
4747
local e = require("nvim-tree.core").get_explorer()
4848
if e then
49-
n = e and e:get_node_at_cursor() or nil
49+
if not n then
50+
n = e:get_node_at_cursor() or nil
51+
end
5052
return fn(e, n, ...)
5153
end
5254
end

0 commit comments

Comments
 (0)