I get a "'Promise' is undefined"-error on Internet Explorer 11. I imported whatwg-fetch but it seems like the polyfill wont be found. Or is there something I'm missing?
import 'whatwg-fetch';
return fetch(url)
.then(function (response) {
return response.json();
}).then(function (json) {
return json;
}).catch(function (ex) {
console.log('failed:' + ex);
});
Make sure you have a Promise polyfill, as IE 11 doesn't support Promises out of the box. I'd recommend es6-promise.
This seems like a good thing to include in documentation.
This library is fantastic, but I long for better documentation.
The library states:
You'll also need a Promise polyfill for older browsers.
$ bower install es6-promise
Additionally, this is a current web standard. Documentation is available in other places too; this is just a polyfill.
Most helpful comment
This seems like a good thing to include in documentation.
This library is fantastic, but I long for better documentation.