Skip to content

Commit

Permalink
refactor: remove unnecessary truthy check (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
thenick775 authored Oct 12, 2024
1 parent 9ec7ab3 commit 9356c40
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gbajs3/src/hooks/use-async-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ export const useAsyncData = <T, R>({
);

useEffect(() => {
if (loadOnMount && !!fetchFn) {
execute();
}
if (loadOnMount) execute();

// without linter override here we would
// re-trigger effect on every access token refresh
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down

0 comments on commit 9356c40

Please sign in to comment.