Skip to content

Commit

Permalink
fix(httpBackend): use of reponseText is redundant and buggy fixes ang…
Browse files Browse the repository at this point in the history
…ular#1922

Signed-off-by: Gonzalo Ruiz de Villa <gonzalo.ruizdevilla@adesis.com>
  • Loading branch information
gonzaloruizdevilla authored and IgorMinar committed Feb 24, 2013
1 parent 2508b47 commit ebecc2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ng/httpBackend.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function createHttpBackend($browser, XHR, $browserDefer, callbacks, rawDocument,
}
// end of the workaround.

completeRequest(callback, status || xhr.status, xhr.response || xhr.responseText,
completeRequest(callback, status || xhr.status, xhr.response,
responseHeaders);
}
};
Expand Down
4 changes: 2 additions & 2 deletions test/ng/httpBackendSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('$httpBackend', function() {

this.send = function() {
this.status = 200;
this.responseText = 'response';
this.response = 'response';
this.readyState = 4;
this.onreadystatechange();
};
Expand Down Expand Up @@ -248,7 +248,7 @@ describe('$httpBackend', function() {
function respond(status, content) {
xhr = MockXhr.$$lastInstance;
xhr.status = status;
xhr.responseText = content;
xhr.response = content;
xhr.readyState = 4;
xhr.onreadystatechange();
}
Expand Down

0 comments on commit ebecc2c

Please sign in to comment.