Fixed exception on trying to forEach empty request headers
This commit is contained in:
parent
b8c4414976
commit
94e69e7dc0
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue