From 37fa1df39492bdcb5c3d13d14922532fce47dcdc Mon Sep 17 00:00:00 2001 From: thenick775 Date: Thu, 10 Oct 2024 20:07:58 -0700 Subject: [PATCH] refactor: remove unnecessary truthy check --- gbajs3/src/hooks/use-async-data.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gbajs3/src/hooks/use-async-data.tsx b/gbajs3/src/hooks/use-async-data.tsx index fd386551..16ebdadf 100644 --- a/gbajs3/src/hooks/use-async-data.tsx +++ b/gbajs3/src/hooks/use-async-data.tsx @@ -40,9 +40,8 @@ export const useAsyncData = ({ ); 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