From 2f51786702e6f0c69930002356941fce8f1db2c7 Mon Sep 17 00:00:00 2001 From: Panpan Date: Mon, 6 Jan 2025 14:20:00 +0800 Subject: [PATCH] fix: syntax error on ios, axios/axios#6608 --- packages/core/src/core/Un.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/core/src/core/Un.ts b/packages/core/src/core/Un.ts index 08f9d9c..78ca979 100644 --- a/packages/core/src/core/Un.ts +++ b/packages/core/src/core/Un.ts @@ -141,12 +141,10 @@ export class Un { return await this._request(configOrUrl, config); } catch (error) { if (error instanceof Error) { - // biome-ignore lint/suspicious/noImplicitAnyLet: - let dummy; + let dummy: any = {}; Error.captureStackTrace - ? // biome-ignore lint/suspicious/noAssignInExpressions: - Error.captureStackTrace((dummy = {})) - : // biome-ignore lint/suspicious/noAssignInExpressions: + ? Error.captureStackTrace(dummy) + : // biome-ignore lint/suspicious/noAssignInExpressions: follow axios implementation (dummy = new Error()); // slice off the Error: ... line const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";