Skip to content

Commit

Permalink
refactor browser code
Browse files Browse the repository at this point in the history
  • Loading branch information
koros committed Mar 27, 2024
1 parent dac8cfb commit f3d4b0e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class MiddlewareFactory {
* Returns the default middleware chain an array with the middleware handlers
* @returns an array of the middleware handlers of the default middleware chain
*/
public static getDefaultMiddlewares(customFetch: (request: string, init: RequestInit) => Promise<Response> = fetch as any): Middleware[] {
public static getDefaultMiddlewares(customFetch: (request: string, init: RequestInit) => Promise<Response> = (...args) => fetch(...args) as any): Middleware[] {
// Browsers handles redirection automatically and do not require the redirectionHandler
return [
new RetryHandler(),
Expand Down

0 comments on commit f3d4b0e

Please sign in to comment.