Skip to content

Commit d5ae59a

Browse files
cpojerfacebook-github-bot
authored andcommitted
Use standard version of Promise.prototype.finally
Summary: See facebook/fbjs#293 for an explanation. Reviewed By: yungsters Differential Revision: D14658680 fbshipit-source-id: aad8808b8514817314bf67b9a43b01d52e850e36
1 parent 9ca7989 commit d5ae59a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Libraries/Promise.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
'use strict';
1212

1313
const Promise = require('promise/setimmediate/es6-extensions');
14-
require('promise/setimmediate/done');
1514

16-
Promise.prototype.finally = function(onSettled) {
17-
return this.then(onSettled, onSettled);
18-
};
15+
require('promise/setimmediate/done');
16+
require('promise/setimmediate/finally');
1917

2018
if (__DEV__) {
2119
require('promise/setimmediate/rejection-tracking').enable({

0 commit comments

Comments
 (0)