Skip to content

Commit

Permalink
refactor(client): filter null interceptors from options
Browse files Browse the repository at this point in the history
  • Loading branch information
kahirokunn committed Jul 4, 2024
1 parent 7fc1d37 commit 197c24f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/kubekit-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kubekit/client",
"version": "0.2.31",
"version": "0.2.32",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"author": "kahirokunn",
Expand Down
2 changes: 1 addition & 1 deletion packages/kubekit-client/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export async function apiClient<Response>(
interceptors: [] as Interceptor[],
...removeNullableProperties(extraOptions),
};
options.interceptors = [...globalInterceptors, ...options.interceptors];
options.interceptors = [...globalInterceptors, ...options.interceptors].filter((interceptor) => interceptor);
if (options.interceptors.length === 0) {
options.interceptors = [defaultAuthorizationInterceptor];
}
Expand Down

0 comments on commit 197c24f

Please sign in to comment.