🔧 npm update
This commit is contained in:
14
node_modules/axios/lib/platform/common/utils.js
generated
vendored
14
node_modules/axios/lib/platform/common/utils.js
generated
vendored
@@ -1,5 +1,7 @@
|
||||
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
||||
|
||||
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
||||
|
||||
/**
|
||||
* Determine if we're running in a standard browser environment
|
||||
*
|
||||
@@ -17,10 +19,8 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
const hasStandardBrowserEnv = (
|
||||
(product) => {
|
||||
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
|
||||
})(typeof navigator !== 'undefined' && navigator.product);
|
||||
const hasStandardBrowserEnv = hasBrowserEnv &&
|
||||
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
||||
|
||||
/**
|
||||
* Determine if we're running in a standard browser webWorker environment
|
||||
@@ -40,8 +40,12 @@ const hasStandardBrowserWebWorkerEnv = (() => {
|
||||
);
|
||||
})();
|
||||
|
||||
const origin = hasBrowserEnv && window.location.href || 'http://localhost';
|
||||
|
||||
export {
|
||||
hasBrowserEnv,
|
||||
hasStandardBrowserWebWorkerEnv,
|
||||
hasStandardBrowserEnv
|
||||
hasStandardBrowserEnv,
|
||||
_navigator as navigator,
|
||||
origin
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user