Skip to content

Commit

Permalink
Updated dependencies;
Browse files Browse the repository at this point in the history
Fixed outer progress calculation for async functions decorated with the `useAsyncEffect` hook;
  • Loading branch information
DigitalBrainJS committed May 7, 2021
1 parent 782bccb commit a69597a
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 104 deletions.
4 changes: 2 additions & 2 deletions lib/use-async-effect.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ const useAsyncCallback = (generator, options) => {
canceled
})
}
}).weight(0);
}).weight(0).aggregate();

promises.push(promise);

Expand All @@ -285,7 +285,7 @@ const useAsyncCallback = (generator, options) => {
const promise = resolveGenerator().finally(() => {
removeElement(promises, promise);
combine && argsToPromiseMap.delete(promise);
}).weight(0);
}).weight(0).aggregate();

promises.push(promise);

Expand Down
Loading

0 comments on commit a69597a

Please sign in to comment.