fix(request-hook): increase priority for handle...
configuration. Now `onComplete` callback in handle config overwrite `onComplete` callback in hook config. Closes #10
This commit is contained in:
parent
55bb4fe795
commit
7e8bc3d557
1 changed files with 1 additions and 1 deletions
|
@ -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 });
|
||||
|
|
Reference in a new issue