Skip to content

Commit 7086fb8

Browse files
committed
fix: fix the Un constructor implementation to treat the config argument as optional, axios/axios#6881
1 parent 1492bf5 commit 7086fb8

File tree

1 file changed

+1
-1
lines changed
  • packages/core/src/core

1 file changed

+1
-1
lines changed

packages/core/src/core/Un.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class Un<T = UnData, D = UnData> {
1616
};
1717

1818
constructor(instanceConfig: UnConfig<T, D>) {
19-
this.defaults = instanceConfig;
19+
this.defaults = instanceConfig || {};
2020
this.interceptors = {
2121
request: new UnInterceptorManager(),
2222
response: new UnInterceptorManager(),

0 commit comments

Comments
 (0)