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:
+2
-2
@@ -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/, '') : '';
|
||||
|
||||
Reference in New Issue
Block a user