Closed neojski closed 9 years ago
In that case I'd rather keep one callback, and then assign the error as
if(!body) {
error = error || "No body found in response";
}
So we don't clobber the preexisting error, and we keep the code path a single path.
Done.
:+1:
I updated the PR. I call the
callback
now early so that we don't override theerror
with ourNo body found in response
in case there was an error because most like it's going to be more informative.