Skip to content

Commit

Permalink
[NS]: Send false flag isStandardBrowserEnv for Nativescript
Browse files Browse the repository at this point in the history
  • Loading branch information
arpit2438735 authored and Khaledgarbaya committed Jun 19, 2018
1 parent 73cab97 commit 8cb7d66
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,13 @@ function trim(str) {
*
* react-native:
* navigator.product -> 'ReactNative'
* nativescript
* navigator.product -> 'NativeScript' or 'NS'
*/
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 (
Expand Down

0 comments on commit 8cb7d66

Please sign in to comment.