From c6ed85afcc404aa0269d4ba21bc003f4374c5000 Mon Sep 17 00:00:00 2001 From: Philipp von Weitershausen Date: Fri, 22 May 2015 16:21:58 -0700 Subject: [PATCH] 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 Test Plan: Imported from GitHub, without a `Test Plan:` line. --- Libraries/Network/XMLHttpRequestBase.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/Network/XMLHttpRequestBase.js b/Libraries/Network/XMLHttpRequestBase.js index 99a327b5f..83e44073e 100644 --- a/Libraries/Network/XMLHttpRequestBase.js +++ b/Libraries/Network/XMLHttpRequestBase.js @@ -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; }