{"action":"created","issue":{"url":"https://api.github.com/repos/stripe/react-stripe-elements/issues/253","repository_url":"https://api.github.com/repos/stripe/react-stripe-elements","labels_url":"https://api.github.com/repos/stripe/react-stripe-elements/issues/253/labels{/name}","comments_url":"https://api.github.com/repos/stripe/react-stripe-elements/issues/253/comments","events_url":"https://api.github.com/repos/stripe/react-stripe-elements/issues/253/events","html_url":"https://github.com/stripe/react-stripe-elements/issues/253","id":365619064,"node_id":"MDU6SXNzdWUzNjU2MTkwNjQ=","number":253,"title":"createSource not working without passing element","user":{"login":"nonken","id":114567,"node_id":"MDQ6VXNlcjExNDU2Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/114567?v=4","gravatar_id":"","url":"https://api.github.com/users/nonken","html_url":"https://github.com/nonken","followers_url":"https://api.github.com/users/nonken/followers","following_url":"https://api.github.com/users/nonken/following{/other_user}","gists_url":"https://api.github.com/users/nonken/gists{/gist_id}","starred_url":"https://api.github.com/users/nonken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nonken/subscriptions","organizations_url":"https://api.github.com/users/nonken/orgs","repos_url":"https://api.github.com/users/nonken/repos","events_url":"https://api.github.com/users/nonken/events{/privacy}","received_events_url":"https://api.github.com/users/nonken/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-01T19:59:53Z","updated_at":"2018-10-05T20:45:32Z","closed_at":"2018-10-01T20:09:05Z","author_association":"NONE","body":"### Summary\r\n\r\nSince `2.0.0` a call to `createSource` without passing the element within the HOC component fails with `Invalid Source type passed to createSource. Expected string, got undefined.`\r\n\r\nLooking at the source of the wrapper I see the following\r\n\r\n```\r\nvar options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\r\n\r\n          if (options && (typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object') {\r\n            if (typeof options.type !== 'string') {\r\n              throw new Error('Invalid Source type passed to createSource. Expected string, got ' + _typeof(options.type) + '.');\r\n            }\r\n```\r\nWhen the function is called without args, options defaults to `{}`. `options.type` therefor is `undefined` so the call throws."},"comment":{"url":"https://api.github.com/repos/stripe/react-stripe-elements/issues/comments/427493709","html_url":"https://github.com/stripe/react-stripe-elements/issues/253#issuecomment-427493709","issue_url":"https://api.github.com/repos/stripe/react-stripe-elements/issues/253","id":427493709,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzQ5MzcwOQ==","user":{"login":"atty-stripe","id":31416034,"node_id":"MDQ6VXNlcjMxNDE2MDM0","avatar_url":"https://avatars0.githubusercontent.com/u/31416034?v=4","gravatar_id":"","url":"https://api.github.com/users/atty-stripe","html_url":"https://github.com/atty-stripe","followers_url":"https://api.github.com/users/atty-stripe/followers","following_url":"https://api.github.com/users/atty-stripe/following{/other_user}","gists_url":"https://api.github.com/users/atty-stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/atty-stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atty-stripe/subscriptions","organizations_url":"https://api.github.com/users/atty-stripe/orgs","repos_url":"https://api.github.com/users/atty-stripe/repos","events_url":"https://api.github.com/users/atty-stripe/events{/privacy}","received_events_url":"https://api.github.com/users/atty-stripe/received_events","type":"User","site_admin":false},"created_at":"2018-10-05T20:45:32Z","updated_at":"2018-10-05T20:45:32Z","author_association":"CONTRIBUTOR","body":"Sorry about that! We've updated the docs."}}
{"actor":{"display_login":"atty-stripe"}}