2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

fix(core): fix ReferenceError: navigator is not defined for custom environments; (#6567)

This commit is contained in:
Dmitriy Mozgovoy
2024-08-23 15:16:42 +03:00
committed by GitHub
parent 550d885eb9
commit fed1a4b2d7
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ export default platform.hasStandardBrowserEnv ?
// Standard browser envs have full support of the APIs needed to test
// whether the request URL is of the same origin as current location.
(function standardBrowserEnv() {
const msie = /(msie|trident)/i.test(navigator.userAgent);
const msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent);
const urlParsingNode = document.createElement('a');
let originURL;