I'm using axios library and using then(), catch() and finally(). Works perfectly in Chrome. However the finally() method does not work in MS Edge. I researched using polyfills or shims and I'm lost. I am not using webpack or transpiling and don't plan to add them. I need to keep this simple. How can I add a polyfill to make sure finally() works in Edge? Thanks!
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- void before promise syntax
- Keeping track of variable instances
This should handle the propagation of the thenable's
species
in addition to the behaviors detailed below:This implementation is based on the documented behavior of
finally()
and depends onthen()
being compliant to the specification:And of course a demonstration of equivalent behavior:
Thanks to @Bergi for his input on this answer. Please see his implementation and upvote it as well if you found this post helpful.