Fix InteractionManager promise issue with some OSS setups
Reviewed By: yungsters Differential Revision: D3860551 fbshipit-source-id: 731ba758e28ce24f12ca80f7be0f962e6929ee2c
This commit is contained in:
parent
25e048ba3a
commit
3b5e4cc593
|
@ -99,7 +99,13 @@ var InteractionManager = {
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
then: promise.then.bind(promise),
|
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() {
|
cancel: function() {
|
||||||
_taskQueue.cancelTasks(tasks);
|
_taskQueue.cancelTasks(tasks);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue