Your IP : 216.73.216.79


Current Path : /var/www/html/reddsis/node_modules/promise-polyfill/src/
Upload File :
Current File : /var/www/html/reddsis/node_modules/promise-polyfill/src/finally.js

/**
 * @this {Promise}
 */
function finallyConstructor(callback) {
  var constructor = this.constructor;
  return this.then(
    function(value) {
      // @ts-ignore
      return constructor.resolve(callback()).then(function() {
        return value;
      });
    },
    function(reason) {
      // @ts-ignore
      return constructor.resolve(callback()).then(function() {
        // @ts-ignore
        return constructor.reject(reason);
      });
    }
  );
}

export default finallyConstructor;