diff --git a/Libraries/Promise.js b/Libraries/Promise.js index 0a277621546..960834cd5a8 100644 --- a/Libraries/Promise.js +++ b/Libraries/Promise.js @@ -10,10 +10,12 @@ 'use strict'; -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ -const Promise = require('fbjs/lib/Promise.native'); +const Promise = require('promise/setimmediate/es6-extensions'); +require('promise/setimmediate/done'); + +Promise.prototype.finally = function(onSettled) { + return this.then(onSettled, onSettled); +}; if (__DEV__) { /* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an