2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2025-01-29 01:58:35 +00:00
2017-07-31 15:51:51 +05:30

17 lines
348 B
JavaScript

'use strict';
var Promise = require('./core.js');
module.exports = Promise;
Promise.prototype['finally'] = function (f) {
return this.then(function (value) {
return Promise.resolve(f()).then(function () {
return value;
});
}, function (err) {
return Promise.resolve(f()).then(function () {
throw err;
});
});
};