Skip to content

Commit

Permalink
Merge pull request #10130 from DFE-Digital/cv/fix-reference-back-button
Browse files Browse the repository at this point in the history
Fix back link for references interruptions
  • Loading branch information
CatalinVoineag authored Dec 3, 2024
2 parents 8d1bbf1 + c77fb18 commit 5661ef8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ def set_navigation_links
@next_step = return_to_path || candidate_interface_references_relationship_path

return_to_params = return_to_review? ? { return_to: 'review' } : nil
@back_link = candidate_interface_references_edit_email_address_path(@reference.id, params: return_to_params)
@back_link = if @reference.nil?
candidate_interface_references_review_path
else
candidate_interface_references_edit_email_address_path(@reference.id, params: return_to_params)
end
end
end
end
Expand Down

0 comments on commit 5661ef8

Please sign in to comment.