diff --git a/lib/microwaveprop_web/live/map_live.ex b/lib/microwaveprop_web/live/map_live.ex index 35e9431a..41513d19 100644 --- a/lib/microwaveprop_web/live/map_live.ex +++ b/lib/microwaveprop_web/live/map_live.ex @@ -28,8 +28,8 @@ defmodule MicrowavepropWeb.MapLive do end @impl true - def handle_event("select_band", %{"value" => band_str}, socket) do - band = String.to_integer(band_str) + def handle_event("select_band", %{"value" => band}, socket) do + band = if is_binary(band), do: String.to_integer(band), else: band scores = Propagation.latest_scores(band, socket.assigns.bounds) socket = @@ -105,8 +105,10 @@ defmodule MicrowavepropWeb.MapLive do >