mirror of
https://github.com/tenrok/axios.git
synced 2026-06-11 18:02:32 +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();
|
||||
|
||||
export const getFetch = (config) => {
|
||||
let env = config ? config.env : {};
|
||||
let env = (config && config.env) || {};
|
||||
const {fetch, Request, Response} = env;
|
||||
const seeds = [
|
||||
Request, Response, fetch
|
||||
|
||||
Reference in New Issue
Block a user