Skip to content

Commit

Permalink
Change to safe method call
Browse files Browse the repository at this point in the history
  • Loading branch information
360dgries committed Jan 19, 2024
1 parent 6135e59 commit 3215452
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/inferno/apps/web/controllers/test_sessions/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Create < Controller

def handle(req, res)
params = req.params.to_h
if req.body.string.present? && req.env['CONTENT_TYPE'].include?('application/json')
if req.body.string.present? && req.env['CONTENT_TYPE']&.include?('application/json')
params.merge!(JSON.parse(req.body.string).symbolize_keys)
end

Expand Down

0 comments on commit 3215452

Please sign in to comment.