mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-01 13:03:08 +08:00
Fix InteractionManager promise issue with some OSS setups
Reviewed By: yungsters Differential Revision: D3860551 fbshipit-source-id: 731ba758e28ce24f12ca80f7be0f962e6929ee2c
This commit is contained in:
committed by
Facebook Github Bot 3
parent
25e048ba3a
commit
3b5e4cc593
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user