Skip to content

Commit 9640d0b

Browse files
committed
fix pattern match
1 parent 8515c37 commit 9640d0b

File tree

1 file changed

+2
-2
lines changed
  • apps/language_server/lib/language_server/providers/code_action

1 file changed

+2
-2
lines changed

apps/language_server/lib/language_server/providers/code_action/helpers.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ defmodule ElixirLS.LanguageServer.Providers.CodeAction.Helpers do
5454
# https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#diagnostic
5555
# message can be string or MarkupContent
5656
# string
57-
def diagnostic_to_message(diagnostic) when is_binary(diagnostic), do: diagnostic
57+
def diagnostic_to_message(%{"message" => message}) when is_binary(message), do: message
5858

5959
# MarkupContent
60-
def diagnostic_to_message(%{"kind" => kind, "value" => value})
60+
def diagnostic_to_message(%{"message" => %{"kind" => kind, "value" => value}})
6161
when kind in ["plaintext", "markdown"],
6262
do: value
6363
end

0 commit comments

Comments
 (0)