source: frontend/node_modules/promise/lib/finally.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 345 bytes
Line 
1'use strict';
2
3var Promise = require('./core.js');
4
5module.exports = Promise;
6Promise.prototype.finally = function (f) {
7 return this.then(function (value) {
8 return Promise.resolve(f()).then(function () {
9 return value;
10 });
11 }, function (err) {
12 return Promise.resolve(f()).then(function () {
13 throw err;
14 });
15 });
16};
Note: See TracBrowser for help on using the repository browser.