Skip to content

Commit 4b25d09

Browse files
authored
Check the type of result before we pass it to extract_symbols (#25)
1 parent fb6b54e commit 4b25d09

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/lsp-status/current_function.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ end
1111
-- Find current function context
1212
local function current_function_callback(_, _, result, _, _)
1313
vim.b.lsp_current_function = ''
14+
if type(result) ~= table then
15+
return
16+
end
17+
1418
local function_symbols = util.filter(util.extract_symbols(result),
1519
function(_, v)
1620
return v.kind == 'Class' or v.kind == 'Function' or v.kind == 'Method'

0 commit comments

Comments
 (0)