Skip to content

Commit

Permalink
Update lib/signs/utilities/last_trip.ex
Browse files Browse the repository at this point in the history
Co-authored-by: Brett Heath-Wlaz <[email protected]>
  • Loading branch information
PaulJKim and panentheos authored Apr 30, 2024
1 parent cb25ac7 commit 946a8cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/signs/utilities/last_trip.ex
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ defmodule Signs.Utilities.LastTrip do
message_string = Content.Message.to_string(message)

if is_list(message_string) do
Enum.max_by(message_string, fn {string, _} -> String.length(string) end)
|> elem(0)
|> String.length()
Stream.map(message_string, fn {string, _} -> String.length(string) end)
|> Enum.max()
else
String.length(message_string)
end
Expand Down

0 comments on commit 946a8cd

Please sign in to comment.