mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
fix(fetch): prevent TypeError when config.env is undefined (#7155)
This commit is contained in:
@@ -262,7 +262,7 @@ const factory = (env) => {
|
|||||||
const seedCache = new Map();
|
const seedCache = new Map();
|
||||||
|
|
||||||
export const getFetch = (config) => {
|
export const getFetch = (config) => {
|
||||||
let env = config ? config.env : {};
|
let env = (config && config.env) || {};
|
||||||
const {fetch, Request, Response} = env;
|
const {fetch, Request, Response} = env;
|
||||||
const seeds = [
|
const seeds = [
|
||||||
Request, Response, fetch
|
Request, Response, fetch
|
||||||
|
|||||||
Reference in New Issue
Block a user