This fetch works fine in Chrome:
fetch( this.props.url, {credentials:'same-origin'})
.then( (data) => data.json() )
.then( (data) => {
if( data.length > 0) {
// do some stuff
} else {
console.log('No data Richard of the Beard of the Lewis.');
}
});
I am using isomorphic-fetch, and I am polyfilling my promise with promise-polyfill. I'm using webpack and babel to compile the js.
When I execute this code in IE11, the initial fetch of data executes and my response does contain the requested data, but nothing within my then appears to execute at all (I've applied console.logs in several different places to see if they were twitching at all after the fetch completed...no go). I have no console errors, so I assume IE11 is happy enough with the compiled js' syntax.
Does anybody have a clue for me to try? Do I need to re-write my fetch statement in some more verbose way so that IE11 will execute it completely? Anything is helpful at this point! Thanks for any input.