2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

fix: ios11 breaks when build (#6608)

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Kenzo Wada
2024-09-27 02:28:35 +09:00
committed by GitHub
parent 6dbbda617b
commit 763895270f
+2 -2
View File
@@ -40,9 +40,9 @@ class Axios {
return await this._request(configOrUrl, config);
} catch (err) {
if (err instanceof Error) {
let dummy;
let dummy = {};
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
// slice off the Error: ... line
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';