From 5df39d8fa056e7eadf5aaceedb778b2568a4a73c Mon Sep 17 00:00:00 2001 From: Nick Uraltsev Date: Wed, 1 Mar 2017 21:52:42 -0800 Subject: [PATCH] Check that navigator is defined --- lib/utils.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index 94477ed..180820f 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -169,7 +169,6 @@ function trim(str) { * * This allows axios to run in a web worker, and react-native. * Both environments support XMLHttpRequest, but not fully standard globals. - * As of react-native 0.13, it can be identified from navigator.product. * * web workers: * typeof window -> undefined @@ -179,7 +178,7 @@ function trim(str) { * navigator.product -> 'ReactNative' */ function isStandardBrowserEnv() { - if (typeof navigator.product !== 'undefined' && navigator.product === 'ReactNative') { + if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { return false; } return ( -- GitLab