Skip to content

Commit 8cb7d66

Browse files
arpit2438735Khaledgarbaya
authored andcommitted
[NS]: Send false flag isStandardBrowserEnv for Nativescript
1 parent 73cab97 commit 8cb7d66

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/utils.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,13 @@ function trim(str) {
177177
*
178178
* react-native:
179179
* navigator.product -> 'ReactNative'
180+
* nativescript
181+
* navigator.product -> 'NativeScript' or 'NS'
180182
*/
181183
function isStandardBrowserEnv() {
182-
if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
184+
if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
185+
navigator.product === 'NativeScript' ||
186+
navigator.product === 'NS') {
183187
return false;
184188
}
185189
return (

0 commit comments

Comments
 (0)