This commit is contained in:
byte[] 2021-10-24 16:19:01 -04:00
parent 6b2e46c9e8
commit fee0d030a8
2 changed files with 7 additions and 2 deletions

View file

@ -8,6 +8,8 @@ defmodule PhilomenaWeb.MarkdownView do
def required?(required) when required == false, do: nil
def required?(_), do: true
def add_classes(base_classes, new_classes) when is_binary(new_classes), do: "#{base_classes} #{new_classes}"
def add_classes(base_classes, new_classes) when is_binary(new_classes),
do: "#{base_classes} #{new_classes}"
def add_classes(base_classes, _), do: base_classes
end

View file

@ -8,7 +8,10 @@ defmodule PhilomenaWeb.StatView do
{
%{"doc_count" => min_docs},
%{"doc_count" => max_docs}
} = Enum.min_max_by(data, & &1["doc_count"], fn -> {%{"doc_count" => 0}, %{"doc_count" => 0}} end)
} =
Enum.min_max_by(data, & &1["doc_count"], fn ->
{%{"doc_count" => 0}, %{"doc_count" => 0}}
end)
graph_width = 950
graph_height = 475