Fix the way we check for AndroidBridge global (#11969)

* Change the way we check for AndroidBridge global

* Modify logic to check for not undefined
This commit is contained in:
Fernando Valverde 2020-12-18 09:44:53 -06:00 committed by GitHub
parent ecd243c30e
commit e48abdc586
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ class Runtime {
static isNativeAndroid(namespace = null) {
const nativeCheck =
/DEV-Native-android|ForemWebView/i.test(navigator.userAgent) &&
AndroidBridge != undefined;
typeof AndroidBridge !== 'undefined';
let namespaceCheck = true;
if (nativeCheck && namespace) {