Fix Promise resolve callback error

Reviewed By: theoy

Differential Revision: D5032525

fbshipit-source-id: 19680cef70f11cccf2abf03d1c1b7e72ac32e43e
This commit is contained in:
Max Sherman 2017-05-09 16:36:46 -07:00 committed by Facebook Github Bot
parent de4d35536d
commit 7dd2cd30af
1 changed files with 2 additions and 2 deletions

View File

@ -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});