From e48abdc58613d3c0ebbaf901fb03b6b412fcceb1 Mon Sep 17 00:00:00 2001 From: Fernando Valverde Date: Fri, 18 Dec 2020 09:44:53 -0600 Subject: [PATCH] Fix the way we check for AndroidBridge global (#11969) * Change the way we check for AndroidBridge global * Modify logic to check for not undefined --- app/assets/javascripts/initializers/runtime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/initializers/runtime.js b/app/assets/javascripts/initializers/runtime.js index 7cfb0c747..e246b53c3 100644 --- a/app/assets/javascripts/initializers/runtime.js +++ b/app/assets/javascripts/initializers/runtime.js @@ -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) {