Skip to content

Commit 20983fe

Browse files
committed
fix build crash when stacktrace entries does not have file
1 parent 1a2f3ff commit 20983fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/language_server/lib/language_server/diagnostics.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ defmodule ElixirLS.LanguageServer.Diagnostics do
255255
line =
256256
stacktrace
257257
|> Enum.find_value(fn {_m, _f, _a, opts} ->
258-
if opts |> Keyword.get(:file) |> SourceFile.Path.absname(project_dir) == path do
258+
file = opts |> Keyword.get(:file)
259+
260+
if file != nil and SourceFile.Path.absname(file, project_dir) == path do
259261
opts |> Keyword.get(:line)
260262
end
261263
end)

0 commit comments

Comments
 (0)