[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:
Ross Williams
2019-05-31 09:11:17 +01:00
committed by Nicolas Gallagher
parent 29146fe5bc
commit 8908db7690
@@ -27,6 +27,8 @@ const InteractionManager = {
handle = requestIdleCallback(() => {
if (task) {
resolve(task());
} else {
resolve();
}
});
});