Fix Promise resolve callback error
Reviewed By: theoy Differential Revision: D5032525 fbshipit-source-id: 19680cef70f11cccf2abf03d1c1b7e72ac32e43e
This commit is contained in:
parent
de4d35536d
commit
7dd2cd30af
|
@ -162,9 +162,9 @@ class Device {
|
||||||
this._handlers.delete(name);
|
this._handlers.delete(name);
|
||||||
reject(new Error('Timeout waiting for device'));
|
reject(new Error('Timeout waiting for device'));
|
||||||
}, DEVICE_TIMEOUT);
|
}, DEVICE_TIMEOUT);
|
||||||
this._handlers.set(name, (...args) => {
|
this._handlers.set(name, arg => {
|
||||||
clearTimeout(timerId);
|
clearTimeout(timerId);
|
||||||
fulfill(...args);
|
fulfill(arg);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this._send({event: name});
|
this._send({event: name});
|
||||||
|
|
Loading…
Reference in New Issue