Skip to content

Commit 8908db7

Browse files
Ross Williamsnecolas
authored andcommitted
[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.
1 parent 29146fe commit 8908db7

File tree

1 file changed

+2
-0
lines changed
  • packages/react-native-web/src/exports/InteractionManager

1 file changed

+2
-0
lines changed

packages/react-native-web/src/exports/InteractionManager/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ const InteractionManager = {
2727
handle = requestIdleCallback(() => {
2828
if (task) {
2929
resolve(task());
30+
} else {
31+
resolve();
3032
}
3133
});
3234
});

0 commit comments

Comments
 (0)