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 e7e6eb3 commit 693bbafCopy full SHA for 693bbaf
lib/backpex/field.ex
@@ -259,11 +259,8 @@ defmodule Backpex.Field do
259
def render(%{type: :index} = assigns) do
260
if Backpex.Field.index_editable_enabled?(assigns.field_options, assigns) do
261
case Map.get(assigns.field_options, :render_index_form) do
262
- nil ->
263
- apply(__MODULE__, :render_index_form, [assigns])
264
-
265
- func ->
266
- func.(assigns)
+ fun when is_function(fun, 1) -> fun.(assigns)
+ nil -> apply(__MODULE__, :render_index_form, [assigns])
267
end
268
else
269
Map.get(assigns.field_options, :render, &render_value/1).(assigns)
0 commit comments