You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This means that, if I need to POST, PUT, etc. an actual boolean false to a web service, I have to work around AngularJS.
I'd like the line to read something like this:
xhr.send(post);
or if it just can't be undefined or something:
xhr.send(isDefined(post) ? post : null);
The text was updated successfully, but these errors were encountered:
johnhoffman
changed the title
$httpBackend coersion of falsey values to null before xhr.send()
$httpBackend coersion of falsy values to null before xhr.send()
Apr 13, 2015
@johnhoffman I think that your analysis is correct, we are too eager with falsy checks here. Would you be up to sending us a PR. The line to be modified is this one
I've initiated PR #11567. I had trouble resolving an recurring error while attempting to run the tests on my local machine (Error: Cannot find module 'es6-symbol'), so I'm not sure if it will pass the Travis CI check.
Can anyone explain why this line in $httpBackend should coerce falsy values to null?
https://github.com/angular/angular.js/blob/master/src/ng/httpBackend.js#L112
This means that, if I need to POST, PUT, etc. an actual boolean false to a web service, I have to work around AngularJS.
I'd like the line to read something like this:
or if it just can't be undefined or something:
The text was updated successfully, but these errors were encountered: