Skip to content

Commit f4bf3fc

Browse files
author
Greg Luis Ramirez
committed
fix todays hours view when no additional info is present
1 parent 8b362a9 commit f4bf3fc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/views/widgets/hours/todays_hours.html.erb

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
<h2><%= day.today? ? 'Today' : day.strftime("%A") %>:
1010
<%= raw "#{value["formatted_hours"].split('<br>').first.html_safe}" %>
1111
</h2>
12-
<p class="limited-hours-info"><%= raw "#{value["formatted_hours"].split('<br>').second.html_safe}" %></p>
12+
<% hours_info = value["formatted_hours"].split('<br>').second %>
13+
<% if hours_info.present? %>
14+
<p class="limited-hours-info"><%= raw "#{hours_info.try(:html_safe)}" %></p>
15+
<% end %>
1316
<% else %>
1417
<h2><%= day.today? ? 'Today' : day.strftime("%A") %>:
1518
<%= raw "#{value["formatted_hours"].html_safe}" %></h2>

0 commit comments

Comments
 (0)