diff options
| author | mads kjeldgaard <mail@madskjeldgaard.dk> | 2021-07-21 23:31:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-21 16:31:55 -0500 |
| commit | d4c645c4d9d06c646188d39ee93868fa8c8d2a13 (patch) | |
| tree | fd7cfd4722c99896760cb753784fa13be13f7970 /lua | |
| parent | fix: make additional_vim_regex_highlighting actually accept a list (diff) | |
| download | nvim-treesitter-d4c645c4d9d06c646188d39ee93868fa8c8d2a13.tar nvim-treesitter-d4c645c4d9d06c646188d39ee93868fa8c8d2a13.tar.gz nvim-treesitter-d4c645c4d9d06c646188d39ee93868fa8c8d2a13.tar.bz2 nvim-treesitter-d4c645c4d9d06c646188d39ee93868fa8c8d2a13.tar.lz nvim-treesitter-d4c645c4d9d06c646188d39ee93868fa8c8d2a13.tar.xz nvim-treesitter-d4c645c4d9d06c646188d39ee93868fa8c8d2a13.tar.zst nvim-treesitter-d4c645c4d9d06c646188d39ee93868fa8c8d2a13.zip | |
recurse_local_nodes: type check local_def to ensure it is a table (#1331)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/locals.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/locals.lua b/lua/nvim-treesitter/locals.lua index 741a7631f..0e9211d33 100644 --- a/lua/nvim-treesitter/locals.lua +++ b/lua/nvim-treesitter/locals.lua @@ -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 |
