Skip to content

Commit

Permalink
fix: ios11 breaks when build (axios#6608)
Browse files Browse the repository at this point in the history
Co-authored-by: Jay <[email protected]>
  • Loading branch information
Kenzo-Wada and jasonsaayman authored Sep 26, 2024
1 parent 6dbbda6 commit 7638952
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core/Axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/, '') : '';
Expand Down

0 comments on commit 7638952

Please sign in to comment.