Skip to content

Commit

Permalink
Protect against calling .any? on a non-array (#16547)
Browse files Browse the repository at this point in the history
Co-authored-by: Tonksthebear <[email protected]>
  • Loading branch information
Tonksthebear and jasonhoc authored Apr 29, 2024
1 parent ea18c8f commit 11c6810
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def get_response_status(failures)
end

def appointment_errors?(failures)
failures.any? { |failure| failure[:appointment_errors].present? }
Array.wrap(failures).any? { |failure| failure[:appointment_errors].present? }
end

def filter_by_date_range(appointments)
Expand Down

0 comments on commit 11c6810

Please sign in to comment.