mirror of https://github.com/status-im/metro.git
Remove 'new' keyword before Promise.race()
Summary: I'm not sure if this was actually breaking anything, but I don't think `new` before `Promise.race()` is conventional. Closes https://github.com/facebook/react-native/pull/9817 Differential Revision: D3836814 Pulled By: javache fbshipit-source-id: 3bde46dca3760c3f7f3427f6346dd5f16f8ac011
This commit is contained in:
parent
3b36662908
commit
a105d9e317
|
@ -21,7 +21,7 @@ const createTimeoutPromise = (timeout) => new Promise((resolve, reject) => {
|
|||
});
|
||||
function timeoutableDenodeify(fsFunc, timeout) {
|
||||
return function raceWrapper(...args) {
|
||||
return new Promise.race([
|
||||
return Promise.race([
|
||||
createTimeoutPromise(timeout),
|
||||
Promise.denodeify(fsFunc).apply(this, args)
|
||||
]);
|
||||
|
|
Loading…
Reference in New Issue