Skip to content

Commit 36fa8f2

Browse files
authored
fix: allow passing a plugin from fetch call options (#52)
1 parent 0c81362 commit 36fa8f2

File tree

1 file changed

+1
-1
lines changed
  • packages/better-fetch/src/create-fetch

1 file changed

+1
-1
lines changed

packages/better-fetch/src/create-fetch/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const createFetch = <Option extends CreateFetchOption>(
7373
const opts = {
7474
...config,
7575
...options,
76-
plugins: [...(config?.plugins || []), applySchemaPlugin(config || {})],
76+
plugins: [...(config?.plugins || []), applySchemaPlugin(config || {}), ...(options?.plugins || [])],
7777
} as BetterFetchOption;
7878

7979
if (config?.catchAllError) {

0 commit comments

Comments
 (0)