Skip to content

Commit 9ccd09a

Browse files
committed
fix: added safe operator for custom link
1 parent 97ad9f5 commit 9ccd09a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/views/casa_org/_custom_links.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</tr>
2727
</thead>
2828
<tbody>
29-
<% @custom_links.each do |custom_link| %>
29+
<% @custom_links&.each do |custom_link| %>
3030
<% id = "custom_link-#{custom_link.id}" %>
3131
<tr>
3232
<td scope="row" class="min-width">

app/views/layouts/_header.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<strong> <%= current_user.email %></strong>
7373
</span>
7474
</li>
75-
<% @custom_links.each do |custom_link| %>
75+
<% @custom_links&.each do |custom_link| %>
7676
<li>
7777
<%= link_to custom_link.url, target: "_blank" do %>
7878
<i class="lni lni-link"></i> <%= custom_link.text %>

0 commit comments

Comments
 (0)