File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -236,11 +236,12 @@ function DataNode:revealPaths(paths)
236236 if kind == NodeKind .PackageRoot then
237237 local hierarchicalNodeData = paths [1 ]
238238 local children = self :getChildren ()
239- --- @type DataNode ?
239+ --- @type DataNode[] ?
240240 local childNode = vim .tbl_filter (function (child )
241241 return vim .startswith (hierarchicalNodeData .name , child ._nodeData .name .. " ." )
242242 or hierarchicalNodeData .name == child ._nodeData .name
243243 end , children )
244+ --- @type DataNode ?
244245 childNode = childNode and # childNode > 0 and childNode [1 ] or nil
245246 if childNode and not childNode [1 ]._hierarchicalNode then
246247 table.remove (paths , 1 )
@@ -253,11 +254,12 @@ function DataNode:revealPaths(paths)
253254 return self :revealPaths (paths )
254255 else
255256 local children = self :getChildren ()
256- --- @type DataNode ?
257+ --- @type DataNode[] ?
257258 local childNode = vim .tbl_filter (function (child )
258259 return vim .startswith (hierarchicalNodeData .name , child ._nodeData .name .. " ." )
259260 or hierarchicalNodeData .name == child ._nodeData .name
260261 end , children )
262+ --- @type DataNode ?
261263 childNode = childNode and # childNode > 0 and childNode [1 ] or nil
262264 return (childNode and # paths > 0 ) and childNode :revealPaths (paths ) or nil
263265 end
You can’t perform that action at this time.
0 commit comments