Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Fix calling include on nil (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
csabol-stripe authored Jul 18, 2019
1 parent 3c368f8 commit 09dbcfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def authenticate!
# to prevent misuse
post '/create_setup_intent' do
payload = params
if request.content_type.include? 'application/json' and params.empty?
if request.content_type != nil and request.content_type.include? 'application/json' and params.empty?
payload = Sinatra::IndifferentHash[JSON.parse(request.body.read)]
end
begin
Expand Down

0 comments on commit 09dbcfa

Please sign in to comment.