Merge pull request #12 from pleshevskiy/bug-10

fix(request-hook): increase priority for handle...
This commit is contained in:
Dmitriy Pleshevskiy 2020-11-06 00:05:15 +02:00 committed by GitHub
commit fc9e4e3b40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ export function useLazyRequest<R = Record<string, any>, V = Record<string, any>,
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 });