diff options
| author | mads kjeldgaard <mail@madskjeldgaard.dk> | 2021-07-21 23:31:55 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2021-09-17 21:06:36 +0200 |
| commit | 64ea6cd46f4ee2c9472e88798e69ff77635308f9 (patch) | |
| tree | fd7cfd4722c99896760cb753784fa13be13f7970 /lua | |
| parent | fix: make additional_vim_regex_highlighting actually accept a list (diff) | |
| download | nvim-treesitter-64ea6cd46f4ee2c9472e88798e69ff77635308f9.tar nvim-treesitter-64ea6cd46f4ee2c9472e88798e69ff77635308f9.tar.gz nvim-treesitter-64ea6cd46f4ee2c9472e88798e69ff77635308f9.tar.bz2 nvim-treesitter-64ea6cd46f4ee2c9472e88798e69ff77635308f9.tar.lz nvim-treesitter-64ea6cd46f4ee2c9472e88798e69ff77635308f9.tar.xz nvim-treesitter-64ea6cd46f4ee2c9472e88798e69ff77635308f9.tar.zst nvim-treesitter-64ea6cd46f4ee2c9472e88798e69ff77635308f9.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 |
