-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: patch axios to avoid calling
process
remove once parcel-bundler/parcel#8433 is fixed
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
diff --git a/node_modules/axios/lib/defaults/index.js b/node_modules/axios/lib/defaults/index.js | ||
index 9199818..d954f5a 100644 | ||
--- a/node_modules/axios/lib/defaults/index.js | ||
+++ b/node_modules/axios/lib/defaults/index.js | ||
@@ -17,15 +17,7 @@ function setContentTypeIfUnset(headers, value) { | ||
} | ||
|
||
function getDefaultAdapter() { | ||
- var adapter; | ||
- if (typeof XMLHttpRequest !== 'undefined') { | ||
- // For browsers use XHR adapter | ||
- adapter = require('../adapters/xhr'); | ||
- } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { | ||
- // For node use HTTP adapter | ||
- adapter = require('../adapters/http'); | ||
- } | ||
- return adapter; | ||
+ return require('../adapters/xhr'); | ||
} | ||
|
||
function stringifySafely(rawValue, parser, encoder) { |