Skip to content

Commit 43be02e

Browse files
committed
fix crash document symbols when unable to extract attribute name
1 parent 8c35947 commit 43be02e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/language_server/lib/language_server/providers/document_symbols.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ defmodule ElixirLS.LanguageServer.Providers.DocumentSymbols do
225225
end
226226

227227
# Other attributes
228-
defp extract_symbol(_current_module, {:@, location, [{name, _, _}]}) do
228+
defp extract_symbol(_current_module, {:@, location, [{name, _, _}]}) when is_atom(name) do
229229
%Info{type: :constant, name: "@#{name}", location: location, children: []}
230230
end
231231

0 commit comments

Comments
 (0)