mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
recurse_local_nodes: type check local_def to ensure it is a table (#1331)
This commit is contained in:
parent
ada52fe561
commit
64ea6cd46f
1 changed files with 4 additions and 0 deletions
|
|
@ -127,6 +127,10 @@ end
|
|||
-- @param The full match path to append to
|
||||
-- @param The last match
|
||||
function M.recurse_local_nodes(local_def, accumulator, full_match, last_match)
|
||||
if type(local_def) ~= "table" then
|
||||
return
|
||||
end
|
||||
|
||||
if local_def.node then
|
||||
accumulator(local_def, local_def.node, full_match, last_match)
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue