Skip to content

Commit 49ab5e7

Browse files
committed
Fix lint error.
1 parent ff1ac2e commit 49ab5e7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/useAsync.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,9 @@ const useAsync = (arg1, arg2) => {
8181
useEffect(() => {
8282
if (watchFn && prevOptions.current && watchFn(options, prevOptions.current)) load()
8383
})
84-
useEffect(
85-
() => {
86-
promise || promiseFn ? load() : cancel()
87-
},
88-
[promise, promiseFn, watch]
89-
)
84+
useEffect(() => {
85+
promise || promiseFn ? load() : cancel()
86+
}, [promise, promiseFn, watch])
9087
useEffect(() => () => (isMounted.current = false), [])
9188
useEffect(() => () => abortController.current.abort(), [])
9289
useEffect(() => (prevOptions.current = options) && undefined)

0 commit comments

Comments
 (0)