Skip to content

Commit b65bf7b

Browse files
committed
Hide empty notes
1 parent 21ed008 commit b65bf7b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

apps/components_guide_web/lib/components_guide_web/controllers/research_controller.ex

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,14 @@ defmodule ComponentsGuideWeb.ResearchController do
108108
[
109109
content_tag(:dt, "Description", class: "font-bold"),
110110
content_tag(:dd, "#{description}"),
111-
content_tag(:dt, "Notes", class: "font-bold"),
112-
content_tag(:dd, "#{notes}"),
111+
case notes do
112+
"" -> []
113+
notes ->
114+
[
115+
content_tag(:dt, "Notes", class: "font-bold"),
116+
content_tag(:dd, "#{notes}")
117+
]
118+
end,
113119
content_tag(:dt, "Internet Explorer", class: "font-bold"),
114120
content_tag(:dd, "#{inspect(stats["ie"])}")
115121
# content_tag(:dd, "#{inspect(item)}")

0 commit comments

Comments
 (0)