From 9a414bb6c81796a95c6c7fe668637825458e8b6d Mon Sep 17 00:00:00 2001 From: Dmitriy Mozgovoy Date: Sat, 26 Aug 2023 20:31:13 +0300 Subject: [PATCH] fix(adapter): make adapter loading error more clear by using platform-specific adapters explicitly (#5837) --- lib/defaults/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/defaults/index.js b/lib/defaults/index.js index a883bfe..27c71b4 100644 --- a/lib/defaults/index.js +++ b/lib/defaults/index.js @@ -37,7 +37,7 @@ const defaults = { transitional: transitionalDefaults, - adapter: ['xhr', 'http'], + adapter: platform.isNode ? 'http' : 'xhr', transformRequest: [function transformRequest(data, headers) { const contentType = headers.getContentType() || '';