fix(Network): response.ok should be true for file:// urls (#2152)

This commit is contained in:
JoelEinbinder
2018-03-12 11:34:33 -07:00
committed by Andrey Lushnikov
parent cad71d9bd9
commit 826fe42c48
3 changed files with 14 additions and 11 deletions

View File

@@ -537,7 +537,7 @@ class Response {
* @return {boolean}
*/
ok() {
return this._status >= 200 && this._status <= 299;
return this._status === 0 || (this._status >= 200 && this._status <= 299);
}
/**
@@ -772,4 +772,4 @@ const statusTexts = {
'511': 'Network Authentication Required',
};
module.exports = NetworkManager;
module.exports = {Request, Response, NetworkManager};