Skip to content

Commit 7630cf4

Browse files
fix(#2495): skip API action if node == nil (#2499)
* fix(#2495): skip action if node == nil * simplify --------- Co-authored-by: Alexander Courtis <alex@courtis.org>
1 parent df38f1f commit 7630cf4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/nvim-tree/api.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ end
4545
local function wrap_node(f)
4646
return function(node, ...)
4747
node = node or require("nvim-tree.lib").get_node_at_cursor()
48-
f(node, ...)
48+
if node then
49+
f(node, ...)
50+
end
4951
end
5052
end
5153

0 commit comments

Comments
 (0)