stefanpenner / es6-promise

A polyfill for ES6-style Promises
MIT License
7.3k stars 593 forks source link

Promise.prototype.catch IE8 Expected identifier error #349

Closed temberature closed 2 years ago

temberature commented 5 years ago

"version": "4.2.6"

  Promise.prototype.catch = function _catch(onRejection) {
    return this.then(null, onRejection);
  };

https://www.npmjs.com/package/es3ify-loader if use webpack, this loader can solve the problem in some situation

stefanpenner commented 2 years ago

Unfortunately, this library cannot help you directly. Ultimately your minifier can be configured to mangle keywords such as catch into value['catch'].

Doing it here, will not help if the users minifier is not correctly configured as an improperly configured minifier will undo the work.