We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8313207 commit acf682cCopy full SHA for acf682c
lib/plausible_web/live/goal_settings/property_pairs.ex
@@ -11,13 +11,12 @@ defmodule PlausibleWeb.Live.GoalSettings.PropertyPairs do
11
socket
12
|> assign(assigns)
13
|> assign_new(:max_slots, fn -> Plausible.Goal.max_custom_props_per_goal() end)
14
- |> assign_new(:slots, fn
15
- %{goal: goal} ->
16
- if Plausible.Goal.has_custom_props?(goal) do
17
- to_list_with_ids(goal.custom_props)
18
- else
19
- to_list_with_ids(empty_row())
20
- end
+ |> assign_new(:slots, fn assigns ->
+ if Plausible.Goal.has_custom_props?(assigns[:goal]) do
+ to_list_with_ids(assigns.goal.custom_props)
+ else
+ to_list_with_ids(empty_row())
+ end
21
end)
22
23
{:ok, socket}
0 commit comments