Skip to content

Commit e0d737d

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/nvim-tree/renderer/components/diagnostics.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
local HL_POSITION = require("nvim-tree.enum").HL_POSITION
22
local diagnostics = require("nvim-tree.diagnostics")
33

4+
local DirectoryNode = require("nvim-tree.node.directory")
5+
46
local M = {
57
-- highlight strings for the icons
68
HS_ICON = {},
@@ -24,7 +26,7 @@ function M.get_highlight(node)
2426

2527
local group
2628
local diag_status = diagnostics.get_diag_status(node)
27-
if node.nodes then
29+
if node:is(DirectoryNode) then
2830
group = M.HS_FOLDER[diag_status and diag_status.value]
2931
else
3032
group = M.HS_FILE[diag_status and diag_status.value]

0 commit comments

Comments
 (0)