fix(locals): add nil guard for definition id creation

This commit is contained in:
Steven Sojka 2020-08-25 07:11:29 -05:00 committed by Stephan Seitz
parent 3fe5a067b3
commit 5d97cc5e09

View file

@ -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)