whatwg-fetch
Advanced tools
Comparing version 0.11.0 to 0.11.1
18
fetch.js
@@ -113,3 +113,3 @@ (function(self) { | ||
try { | ||
new Blob(); | ||
new Blob() | ||
return true | ||
@@ -271,3 +271,3 @@ } catch(e) { | ||
var head = new Headers() | ||
var pairs = xhr.getAllResponseHeaders().trim().split('\n') | ||
var pairs = (xhr.getAllResponseHeaders() || '').trim().split('\n') | ||
pairs.forEach(function(header) { | ||
@@ -325,5 +325,5 @@ var split = header.trim().split(':') | ||
self.Headers = Headers; | ||
self.Request = Request; | ||
self.Response = Response; | ||
self.Headers = Headers | ||
self.Request = Request | ||
self.Response = Response | ||
@@ -351,3 +351,3 @@ self.fetch = function(input, init) { | ||
return; | ||
return | ||
} | ||
@@ -367,3 +367,3 @@ | ||
} | ||
var body = 'response' in xhr ? xhr.response : xhr.responseText; | ||
var body = 'response' in xhr ? xhr.response : xhr.responseText | ||
resolve(new Response(body, options)) | ||
@@ -376,2 +376,6 @@ } | ||
xhr.ontimeout = function() { | ||
reject(new TypeError('Network request failed')) | ||
} | ||
xhr.open(request.method, request.url, true) | ||
@@ -378,0 +382,0 @@ |
{ | ||
"name": "whatwg-fetch", | ||
"description": "A window.fetch polyfill.", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"main": "fetch.js", | ||
@@ -6,0 +6,0 @@ "repository": "github/fetch", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17791
332