Merge pull request #439 from travis-ci/lp-ie-restart
don't send data body if it is empty
This commit is contained in:
commit
7cfa83deb8
|
@ -161,7 +161,11 @@ export default Ember.Service.extend({
|
||||||
if (typeof options.data === "object" && (Ember.isNone(options.contentType) || options.contentType.match(/application\/json/))) {
|
if (typeof options.data === "object" && (Ember.isNone(options.contentType) || options.contentType.match(/application\/json/))) {
|
||||||
data = JSON.stringify(data);
|
data = JSON.stringify(data);
|
||||||
}
|
}
|
||||||
xhr.send(data);
|
if (data) {
|
||||||
|
xhr.send(data);
|
||||||
|
} else {
|
||||||
|
xhr.send();
|
||||||
|
}
|
||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user