mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
[NS]: Send false flag isStandardBrowserEnv for Nativescript
This commit is contained in:
+5
-1
@@ -177,9 +177,13 @@ function trim(str) {
|
|||||||
*
|
*
|
||||||
* react-native:
|
* react-native:
|
||||||
* navigator.product -> 'ReactNative'
|
* navigator.product -> 'ReactNative'
|
||||||
|
* nativescript
|
||||||
|
* navigator.product -> 'NativeScript' or 'NS'
|
||||||
*/
|
*/
|
||||||
function isStandardBrowserEnv() {
|
function isStandardBrowserEnv() {
|
||||||
if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
|
if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
|
||||||
|
navigator.product === 'NativeScript' ||
|
||||||
|
navigator.product === 'NS') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user