Skip to content

Commit

Permalink
new XMLHttpRequest().status is a number, not a string
Browse files Browse the repository at this point in the history
Summary:
See http://www.w3.org/TR/XMLHttpRequest/#interface-xmlhttprequest
Closes #1356
Github Author: Philipp von Weitershausen <philikon@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
  • Loading branch information
philikon committed May 23, 2015
1 parent 53ea27c commit c6ed85a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Libraries/Network/XMLHttpRequestBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class XMLHttpRequestBase {
readyState: number;
responseHeaders: ?Object;
responseText: ?string;
status: ?string;
status: number;

_method: ?string;
_url: ?string;
Expand All @@ -43,7 +43,7 @@ class XMLHttpRequestBase {
this.readyState = this.UNSENT;
this.responseHeaders = undefined;
this.responseText = undefined;
this.status = undefined;
this.status = 0;

this._method = null;
this._url = null;
Expand Down Expand Up @@ -127,7 +127,7 @@ class XMLHttpRequestBase {
this._aborted = true;
}

callback(status: string, responseHeaders: ?Object, responseText: string): void {
callback(status: number, responseHeaders: ?Object, responseText: string): void {
if (this._aborted) {
return;
}
Expand Down

0 comments on commit c6ed85a

Please sign in to comment.