Skip to content

Commit 4f42280

Browse files
authored
Merge pull request #4505 from nhsuk/vaccines-index-dig
Use dig for safe nested array navigation
2 parents b830e48 + 93839a2 commit 4f42280

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)