File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
lib/error_tracker/web/live Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -121,4 +121,7 @@ defmodule ErrorTracker.Web.Live.Show do
121
121
|> limit ( ^ num_results )
122
122
|> Repo . all ( )
123
123
end
124
+
125
+ defp error_has_source_info? ( % Error { source_function: "-" , source_line: "-" } ) , do: false
126
+ defp error_has_source_info? ( % Error { } ) , do: true
124
127
end
Original file line number Diff line number Diff line change 19
19
< pre class = "overflow-auto p-4 rounded-lg bg-gray-300/10 border border-gray-900 " > <%= @ occurrence . reason %> </ pre >
20
20
</ . section >
21
21
22
- < . section title = "Source " >
22
+ < . section :if = { error_has_source_info? ( @ error ) } title = "Source " >
23
23
< pre class = "overflow-auto text-sm p-4 rounded-lg bg-gray-300/10 border border-gray-900 " >
24
24
<%= sanitize_module ( @ error . source_function ) %>
25
25
<%= @ error . source_line %> </ pre >
26
26
</ . section >
27
27
28
- < . section title = "Stacktrace " >
28
+ < . section :if = { @ occurrence . stacktrace . lines != [ ] } title = "Stacktrace " >
29
29
< div class = "p-4 bg-gray-300/10 border border-gray-900 rounded-lg " >
30
30
< div class = "w-full mb-4 " >
31
31
< label class = "flex justify-end " >
You can’t perform that action at this time.
0 commit comments