2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-24 14:04:14 +03:00

Fixing Cookie Helper with Asyc Components (#1105) (#1107)

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Ryan Bown
2020-05-22 22:44:17 +08:00
committed by GitHub
parent 021e741aa1
commit 1cdf9e4039
+1 -2
View File
@@ -2,6 +2,7 @@
var utils = require('./../utils');
var settle = require('./../core/settle');
var cookies = require('./../helpers/cookies');
var buildURL = require('./../helpers/buildURL');
var buildFullPath = require('../core/buildFullPath');
var parseHeaders = require('./../helpers/parseHeaders');
@@ -103,8 +104,6 @@ module.exports = function xhrAdapter(config) {
// 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()) {
var cookies = require('./../helpers/cookies');
// Add xsrf header
var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
cookies.read(config.xsrfCookieName) :