diff options
| author | Steven Sojka <Steven.Sojka@tdameritrade.com> | 2020-08-25 07:11:29 -0500 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2020-08-25 14:35:08 +0200 |
| commit | 5d97cc5e09283ab67a12e3f49f1d610f154c04d3 (patch) | |
| tree | ff23812f07b1faa7e0c2c805fce333c6a5740203 /lua/nvim-treesitter/locals.lua | |
| parent | 3fe5a067b3deb98e7554c94b2ac6160e99d9c186 (diff) | |
fix(locals): add nil guard for definition id creation
Diffstat (limited to 'lua/nvim-treesitter/locals.lua')
| -rw-r--r-- | lua/nvim-treesitter/locals.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/locals.lua b/lua/nvim-treesitter/locals.lua index 14ec47ab..368fd202 100644 --- a/lua/nvim-treesitter/locals.lua +++ b/lua/nvim-treesitter/locals.lua @@ -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) |
