Skip to content

Commit acf682c

Browse files
committed
Fixup test
1 parent 8313207 commit acf682c

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/plausible_web/live/goal_settings/property_pairs.ex

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ defmodule PlausibleWeb.Live.GoalSettings.PropertyPairs do
1111
socket
1212
|> assign(assigns)
1313
|> 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
14+
|> assign_new(:slots, fn assigns ->
15+
if Plausible.Goal.has_custom_props?(assigns[:goal]) do
16+
to_list_with_ids(assigns.goal.custom_props)
17+
else
18+
to_list_with_ids(empty_row())
19+
end
2120
end)
2221

2322
{:ok, socket}

0 commit comments

Comments
 (0)