useProvisionedRequestHandler: reset ref when a new request is loading (#113196)
This commit is contained in:
@@ -90,6 +90,11 @@ export function useProvisionedRequestHandler<T>({
|
||||
workflow,
|
||||
};
|
||||
|
||||
// Reset handler guard when a new request starts loading
|
||||
if (request.isLoading) {
|
||||
hasHandled.current = false;
|
||||
}
|
||||
|
||||
if (request.isError) {
|
||||
hasHandled.current = true;
|
||||
handlers.onError?.(request.error, info);
|
||||
|
||||
Reference in New Issue
Block a user