Skip to content

Commit

Permalink
Ensure Job.existing_group_pull_requests cannot be nil
Browse files Browse the repository at this point in the history
  • Loading branch information
brrygrdn committed Jun 16, 2023
1 parent 783bfd2 commit 67bb7f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions updater/lib/dependabot/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ def initialize(attributes) # rubocop:disable Metrics/AbcSize
# TODO: Make this hash required
#
# We will need to do a pass updating the CLI and smoke tests before this is possible,
# so let's consider it optional for now.
@existing_group_pull_requests = attributes.fetch(:existing_group_pull_requests, [])
# so let's consider it optional for now. If we get a nil value, let's force it to be
# an array.
@existing_group_pull_requests = attributes.fetch(:existing_group_pull_requests, []) || []
@experiments = attributes.fetch(:experiments, {})
@ignore_conditions = attributes.fetch(:ignore_conditions)
@package_manager = attributes.fetch(:package_manager)
Expand Down

0 comments on commit 67bb7f6

Please sign in to comment.