diff --git a/lib/mv_web/live/custom_field_live/index_component.ex b/lib/mv_web/live/custom_field_live/index_component.ex index 5cf0f6b..a670a3e 100644 --- a/lib/mv_web/live/custom_field_live/index_component.ex +++ b/lib/mv_web/live/custom_field_live/index_component.ex @@ -219,6 +219,9 @@ defmodule MvWeb.CustomFieldLive.IndexComponent do send(self(), {:editing_section_changed, nil}) end + # Get actor from assigns or fall back to socket assigns + actor = Map.get(assigns, :actor, socket.assigns[:actor]) + {:ok, socket |> assign(assigns) @@ -228,7 +231,7 @@ defmodule MvWeb.CustomFieldLive.IndexComponent do |> assign_new(:show_delete_modal, fn -> false end) |> assign_new(:custom_field_to_delete, fn -> nil end) |> assign_new(:slug_confirmation, fn -> "" end) - |> stream(:custom_fields, stream_custom_fields(assigns[:actor], self()), reset: true)} + |> stream(:custom_fields, stream_custom_fields(actor, self()), reset: true)} end @impl true