mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +03:00
fix: ios11 breaks when build (#6608)
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
+2
-2
@@ -40,9 +40,9 @@ class Axios {
|
|||||||
return await this._request(configOrUrl, config);
|
return await this._request(configOrUrl, config);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof Error) {
|
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
|
// slice off the Error: ... line
|
||||||
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
||||||
|
|||||||
Reference in New Issue
Block a user