From 8cb7d667fb73c85792d178ffae64e09dee2a3edb Mon Sep 17 00:00:00 2001 From: arpit Date: Sun, 17 Jun 2018 20:33:06 +0530 Subject: [PATCH] [NS]: Send `false` flag isStandardBrowserEnv for Nativescript --- lib/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index aca5f4e..27e7934 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -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 (