Skip to content

Commit c1b4476

Browse files
committed
fix crash when declaration returns a list
1 parent e741cbf commit c1b4476

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

apps/language_server/lib/language_server/providers/declaration.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ defmodule ElixirLS.LanguageServer.Providers.Declaration do
2020

2121
%ElixirLS.LanguageServer.Location{} = location ->
2222
Protocol.Location.new(location, uri, source_file.text, project_dir)
23+
24+
list when is_list(list) ->
25+
Enum.map(list, &Protocol.Location.new(&1, uri, source_file.text, project_dir))
2326
end
2427

2528
{:ok, result}

0 commit comments

Comments
 (0)