mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-30 05:55:48 +08:00
Use standard version of Promise.prototype.finally
Summary: See https://github.com/facebook/fbjs/pull/293 for an explanation. Reviewed By: yungsters Differential Revision: D14658680 fbshipit-source-id: aad8808b8514817314bf67b9a43b01d52e850e36
This commit is contained in:
committed by
Facebook Github Bot
parent
9ca7989f60
commit
d5ae59ab2a
@@ -11,11 +11,9 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const Promise = require('promise/setimmediate/es6-extensions');
|
const Promise = require('promise/setimmediate/es6-extensions');
|
||||||
require('promise/setimmediate/done');
|
|
||||||
|
|
||||||
Promise.prototype.finally = function(onSettled) {
|
require('promise/setimmediate/done');
|
||||||
return this.then(onSettled, onSettled);
|
require('promise/setimmediate/finally');
|
||||||
};
|
|
||||||
|
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
require('promise/setimmediate/rejection-tracking').enable({
|
require('promise/setimmediate/rejection-tracking').enable({
|
||||||
|
|||||||
Reference in New Issue
Block a user