Commit 476f2e06 authored by Stan Hu's avatar Stan Hu
Browse files

Merge branch 'fix-nil-handling' into 'master'

Handle empty arguments case

`JSON.parse('')` results in an error, but `Oj.load('')` returns `nil`.

See merge request !6
parents 445dba15 b6159c24
......@@ -24,7 +24,7 @@ class MarketoTools < Sinatra::Base
params = {}
if params['event_name'] == 'user_create'
if params && params['event_name'] == 'user_create'
user =
client.createupdate_leads([user.to_param], lookup_field: :email)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment