0

I have a problem with the IE11... again

when i try to do some async task i do show a preloader in certain cases

so my code will be like

showPreloader()                 //to show my custom preloader
fetch(...)                      //initiate request to server
.then(...do some actionhere...)
.catch(console.log)             //log errors if any
.then(hidePreloader)            //hide my custom preloader

The deal here is that regardless if the promice fails or not i want second .then() to fire. Kinda like finally clause in C#

And of course this works in any browser except IE. This beast breaks chain after the catch() if it happens and my preloader stays on indefinelty. So is there a way to fix this so it works in IE as well?

Edit 1: Using core-js library for the polyfills for IE

AnKing
  • 1,994
  • 6
  • 31
  • 54

0 Answers0