mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Fixed missed minified builds; (#4805)
* Fixed missed minified builds; Refactored utils.js; Refactored `utils.isStandardBrowserEnv()` as a `platform/browser` property; Added builds size log; * Replaced `rollup-plugin-filesize` with `rollup-plugin-bundle-size`; Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
+2
-2
@@ -58,7 +58,7 @@ export default function xhrAdapter(config) {
|
||||
}
|
||||
}
|
||||
|
||||
if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
|
||||
if (utils.isFormData(requestData) && platform.isStandardBrowserEnv) {
|
||||
requestHeaders.setContentType(false); // Let the browser set it
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ export default function xhrAdapter(config) {
|
||||
// Add xsrf header
|
||||
// This is only done if running in a standard browser environment.
|
||||
// Specifically not if we're in a web worker, or react-native.
|
||||
if (utils.isStandardBrowserEnv()) {
|
||||
if (platform.isStandardBrowserEnv) {
|
||||
// Add xsrf header
|
||||
const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
|
||||
&& config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
||||
|
||||
Reference in New Issue
Block a user