Skip to content

Commit

Permalink
fix(TripPlanner): Clear the map when switching back to summary view (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlarson authored Dec 20, 2024
1 parent 4064a22 commit 863d929
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/dotcom_web/live/trip_planner.ex
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,15 @@ defmodule DotcomWeb.Live.TripPlanner do
itinerary_selection: nil
}

new_map = %{
lines: [],
points: []
}

new_socket =
socket
|> assign(:results, Map.merge(socket.assigns.results, new_results))
|> assign(:map, Map.merge(socket.assigns.map, new_map))

{:noreply, new_socket}
end
Expand Down

0 comments on commit 863d929

Please sign in to comment.