Skip to content

Commit 75ae2d3

Browse files
committed
Use dig for safe nested array navigation
This fixes a potential issue trying to navigate a double-nested array by using `dig` instead. Sentry-Issue: 6855749667
1 parent a0a52c6 commit 75ae2d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/vaccines/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<%= batch.name %>
3131
</span>
3232

33-
<% if batch.id == @todays_batch_id_by_programme_and_vaccine_methods[vaccine.programme][vaccine.method] %>
33+
<% if batch.id == @todays_batch_id_by_programme_and_vaccine_methods.dig(vaccine.programme, vaccine.method) %>
3434
<br>
3535
<span class="nhsuk-caption-m">
3636
(Your default)

0 commit comments

Comments
 (0)