mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 21:53:30 +00:00
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
b6735f3391
commit
8cfa7340d1
@ -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…
x
Reference in New Issue
Block a user