Fix InteractionManager promise issue with some OSS setups

Reviewed By: yungsters

Differential Revision: D3860551

fbshipit-source-id: 731ba758e28ce24f12ca80f7be0f962e6929ee2c
This commit is contained in:
Spencer Ahrens 2016-09-15 15:11:43 -07:00 committed by Facebook Github Bot 3
parent 25e048ba3a
commit 3b5e4cc593
1 changed files with 7 additions and 1 deletions

View File

@ -99,7 +99,13 @@ var InteractionManager = {
});
return {
then: promise.then.bind(promise),
done: promise.done.bind(promise),
done: (...args) => {
if (promise.done) {
promise.done(...args);
} else {
console.warn('Tried to call done when not supported by current Promise implementation.');
}
},
cancel: function() {
_taskQueue.cancelTasks(tasks);
},