Skip to content

Commit 9311cfb

Browse files
committed
chore: resolve undefined-field
1 parent d19f68b commit 9311cfb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/nvim-tree/actions/moves/item.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ local view = require("nvim-tree.view")
33
local core = require("nvim-tree.core")
44
local diagnostics = require("nvim-tree.diagnostics")
55

6+
local FileNode = require("nvim-tree.node.file")
67
local DirectoryNode = require("nvim-tree.node.directory")
78

89
local M = {}
@@ -175,7 +176,7 @@ local function move_prev_recursive(explorer, what, skip_gitignored)
175176
if
176177
node_cur == nil
177178
or node_cur == node_init -- we didn't move
178-
or not node_cur.nodes -- node is a file
179+
or node_cur:is(FileNode) -- node is a file
179180
then
180181
return
181182
end

0 commit comments

Comments
 (0)