new XMLHttpRequest().status is a number, not a string

Summary:
See http://www.w3.org/TR/XMLHttpRequest/#interface-xmlhttprequest
Closes https://github.com/facebook/react-native/pull/1356
Github Author: Philipp von Weitershausen <philikon@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
This commit is contained in:
Philipp von Weitershausen 2015-05-22 16:21:58 -07:00
parent 53ea27c7b8
commit c6ed85afcc
1 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ class XMLHttpRequestBase {
readyState: number;
responseHeaders: ?Object;
responseText: ?string;
status: ?string;
status: number;
_method: ?string;
_url: ?string;
@ -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;
@ -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;
}