~ihabunek/triglav

211705a54625aa10be1c420076a6e6065ffbbcd3 — Ivan Habunek 8 months ago f1d6e83
Don't break when relation has no platform members
1 files changed, 1 insertions(+), 1 deletions(-)

M lib/triglav_web/controllers/zet/routes_controller.ex
M lib/triglav_web/controllers/zet/routes_controller.ex => lib/triglav_web/controllers/zet/routes_controller.ex +1 -1
@@ 134,7 134,7 @@ defmodule TriglavWeb.Zet.RoutesController do
    |> Enum.zip(colors)
    |> Map.new(fn {relation, color} ->
      name = "#{relation.tags["name"]} (##{relation.id})"
      platforms = Map.get(platform_members, relation.id)
      platforms = Map.get(platform_members, relation.id, [])

      route_feature = route_feature(relation, color)
      platform_features = Enum.map(platforms, &platform_feature(&1, color))