mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 19:46:58 -04:00
fix(locals): add nil guard for definition id creation
This commit is contained in:
parent
3fe5a067b3
commit
5d97cc5e09
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ end
|
|||
-- @returns a string id
|
||||
function M.get_definition_id(scope, node_text)
|
||||
-- Add a vaild starting character in case node text doesn't start with a valid one.
|
||||
return table.concat({ 'k', node_text, scope:range() }, '_')
|
||||
return table.concat({ 'k', node_text or '', scope:range() }, '_')
|
||||
end
|
||||
|
||||
function M.get_definitions(bufnr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue