We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4255897 commit a4c7a4cCopy full SHA for a4c7a4c
src/useAsync.js
@@ -44,7 +44,7 @@ const useAsync = (arg1, arg2) => {
44
const handleResolve = count => data =>
45
count === counter.current && setData(data, () => onResolve && onResolve(data))
46
const handleReject = count => error =>
47
- count === counter.current && setError(error, () => onReject && onReject(error))
+ count === counter.current && Promise.reject(setError(error, () => onReject && onReject(error)))
48
49
const start = promiseFn => {
50
if ("AbortController" in window) {
0 commit comments