mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 04:20:09 -04:00
downcase predicate: nil protection
get_node_text could be nil if the range is invalid. With https://github.com/neovim/neovim/pull/15030/ this fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/1531
This commit is contained in:
parent
08c6a3fb55
commit
8eb8cc61e3
1 changed files with 1 additions and 1 deletions
|
|
@ -119,7 +119,7 @@ query.add_directive("downcase!", function(match, _, bufnr, pred, metadata)
|
|||
text = value
|
||||
else
|
||||
local node = match[value]
|
||||
text = query.get_node_text(node, bufnr)
|
||||
text = query.get_node_text(node, bufnr) or ""
|
||||
end
|
||||
|
||||
if #pred == 3 then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue