Replace local attr helpers

This commit is contained in:
2026-06-21 14:24:05 +02:00
parent 62f87b8ab4
commit 6a7a8c4288
7 changed files with 29 additions and 66 deletions

View File

@@ -1,6 +1,8 @@
defmodule BDS.Menu do
@moduledoc false
import BDS.MapUtils, only: [attr: 2]
alias BDS.Persistence
alias BDS.Projects
@@ -263,11 +265,4 @@ defmodule BDS.Menu do
|> String.replace(~s("), """)
end
defp attr(attrs, key) do
cond do
Map.has_key?(attrs, key) -> Map.get(attrs, key)
Map.has_key?(attrs, Atom.to_string(key)) -> Map.get(attrs, Atom.to_string(key))
true -> nil
end
end
end