Merge pull request #439 from travis-ci/lp-ie-restart

don't send data body if it is empty
This commit is contained in:
Piotr Sarnacki 2016-01-21 13:56:30 +01:00
commit 7cfa83deb8

View File

@ -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;
} }
}); });