diff --git a/src/main.js b/src/main.js index 1202921..5767d2b 100644 --- a/src/main.js +++ b/src/main.js @@ -221,7 +221,7 @@ Formsy.Form = React.createClass({ this.props.onSubmit(); - var headers = (Object.keys(this.props.headers).length && this.props.headers) || options.headers; + var headers = (Object.keys(this.props.headers).length && this.props.headers) || options.headers || {}; ajax[this.props.method || 'post'](this.props.url, this.model, this.props.contentType || options.contentType || 'json', headers) .then(function (response) {