Please enable JavaScript to use RhodeCode Enterprise
Commit Description:
merge
Commit Description:
merge
// https://github.com/tc39/proposal-promise-finally
'use strict' ;
var $export = require ( './_export' );
var core = require ( './_core' );
var global = require ( './_global' );
var speciesConstructor = require ( './_species-constructor' );
var promiseResolve = require ( './_promise-resolve' );
$export ( $export . P + $export . R , 'Promise' , { 'finally' : function ( onFinally ) {
var C = speciesConstructor ( this , core . Promise || global . Promise );
var isFunction = typeof onFinally == 'function' ;
return this . then (
isFunction ? function ( x ) {
return promiseResolve ( C , onFinally ()). then ( function () { return x ; });
} : onFinally ,
isFunction ? function ( e ) {
return promiseResolve ( C , onFinally ()). then ( function () { throw e ; });
} : onFinally
);
} });
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository permissions settings