Stop using Promise from fbjs

Summary: This module simply forwards to the `promise` module. I inlined the code to remove the dependency.

Reviewed By: yungsters

Differential Revision: D13137980

fbshipit-source-id: e3d6208068911711fc5f5378f2d5bb6ac38f2eb2
This commit is contained in:
Christoph Nakazawa 2018-11-26 06:24:05 -08:00 committed by Facebook Github Bot
parent 287934dba9
commit dc8246d56e
1 changed files with 6 additions and 4 deletions

View File

@ -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