mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-10 22:45:24 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user