fix: attempt to concatenate when entry.kind == nil or or symbol_type == nil (#853)

This commit is contained in:
Alex Mastro
2021-05-30 01:54:17 -07:00
committed by GitHub
parent ec8cf12cdc
commit d2b3b08077

View File

@@ -424,7 +424,7 @@ function make_entry.gen_from_lsp_symbols(opts)
if not opts.ignore_filename and filename then
ordinal = filename .. " "
end
ordinal = ordinal .. symbol_name .. " " .. symbol_type
ordinal = ordinal .. symbol_name .. " " .. (symbol_type or "unknown")
return {
valid = true,
@@ -562,7 +562,7 @@ function make_entry.gen_from_treesitter(opts)
value = entry.node,
kind = entry.kind,
ordinal = node_text .. " " .. entry.kind,
ordinal = node_text .. " " .. (entry.kind or "unknown"),
display = make_display,
node_text = node_text,