Skip to content

Commit

Permalink
fix crash on invalid delegate AST node
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Dec 25, 2023
1 parent c315c2c commit a61260a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/elixir_sense/core/metadata_builder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ defmodule ElixirSense.Core.MetadataBuilder do
{:defdelegate, meta, [{name, meta2, params}, body]},
state
)
when is_atom(name) do
when is_atom(name) and is_list(body) do
ast_without_params = {:defdelegate, meta, [{name, add_no_call(meta2), []}, body]}
target_module = body |> Keyword.get(:to)

Expand Down

0 comments on commit a61260a

Please sign in to comment.