diff --git a/src/lazy-request-hook.ts b/src/lazy-request-hook.ts index 4bb95c9..dadd674 100644 --- a/src/lazy-request-hook.ts +++ b/src/lazy-request-hook.ts @@ -78,7 +78,7 @@ export function useLazyRequest, V = Record, return Promise.resolve(state.data); } - const onComplete = config?.onComplete ?? handlerConfig?.onComplete; + const onComplete = handlerConfig?.onComplete ?? config?.onComplete; const onFailure = handlerConfig?.onFailure ?? config?.onFailure; dispatch({ type: 'call', headers, variables, params });