From 8d74f2ae8e8aeea8ae9610a07f5eb40b2031d98a Mon Sep 17 00:00:00 2001 From: Jamil Date: Wed, 19 Jun 2024 09:47:11 -0700 Subject: [PATCH] fix(portal): Fix Enum.find_value to extract actor name in confirmation dialog (#5430) Fixes #4884 Fixes #5425 --- elixir/apps/web/lib/web/live/groups/edit_actors.ex | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/elixir/apps/web/lib/web/live/groups/edit_actors.ex b/elixir/apps/web/lib/web/live/groups/edit_actors.ex index 46fe8bdbc..01afa13f4 100644 --- a/elixir/apps/web/lib/web/live/groups/edit_actors.ex +++ b/elixir/apps/web/lib/web/live/groups/edit_actors.ex @@ -205,13 +205,9 @@ defmodule Web.Groups.EditActors do end defp actor_name(socket, id) do - Enum.find_value( - socket.assigns.actors, - fn actor -> - actor.id == id - end, - & &1.name - ) + Enum.find_value(socket.assigns.actors, fn actor -> + if actor.id == id, do: actor.name + end) end defp member?(current_member_ids, actor, added, removed) do