mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-25 07:34:45 +00:00
[fix] InteractionManager runAfterInteractions resolve
Close #1355 InteractionManager runAfterInteractions does not resolve its promise unless the function is provided with a callback. Using promises, the user of the library should not need to provide a callback. This update adds an else case when there is no callback to call the Promise's resolve function without arguments.
This commit is contained in:
committed by
Nicolas Gallagher
parent
29146fe5bc
commit
8908db7690
@@ -27,6 +27,8 @@ const InteractionManager = {
|
||||
handle = requestIdleCallback(() => {
|
||||
if (task) {
|
||||
resolve(task());
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user