~sbaildon/calibex

508fadf9ac9e68c370902f900a655ad98d208350 — Sean Baildon 8 months ago 29303f1
fix: replace deprecated Enum.filter_map/3
1 files changed, 8 insertions(+), 2 deletions(-)

M lib/helpers.ex
M lib/helpers.ex => lib/helpers.ex +8 -2
@@ 32,8 32,14 @@ defmodule Calibex.Helper do
      end)

    case fill_by_parent[parent] do
      nil -> props
      tofill -> Enum.filter_map(tofill, &(!props[&1]), &{&1, default(&1, props)}) ++ props
      nil ->
        props

      tofill ->
        tofill
        |> Enum.filter(&(!props[&1]))
        |> Enum.map(&{&1, default(&1, props)})
        |> Enum.concat(props)
    end
  end