Skip to content

Commit 2f51786

Browse files
committed
fix: syntax error on ios, axios/axios#6608
1 parent 21c94e2 commit 2f51786

File tree

1 file changed

+3
-5
lines changed
  • packages/core/src/core

1 file changed

+3
-5
lines changed

packages/core/src/core/Un.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,10 @@ export class Un<T = UnData, D = UnData> {
141141
return await this._request(configOrUrl, config);
142142
} catch (error) {
143143
if (error instanceof Error) {
144-
// biome-ignore lint/suspicious/noImplicitAnyLet: <explanation>
145-
let dummy;
144+
let dummy: any = {};
146145
Error.captureStackTrace
147-
? // biome-ignore lint/suspicious/noAssignInExpressions: <explanation>
148-
Error.captureStackTrace((dummy = {}))
149-
: // biome-ignore lint/suspicious/noAssignInExpressions: <explanation>
146+
? Error.captureStackTrace(dummy)
147+
: // biome-ignore lint/suspicious/noAssignInExpressions: follow axios implementation
150148
(dummy = new Error());
151149
// slice off the Error: ... line
152150
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";

0 commit comments

Comments
 (0)