diff --git a/BMSPushSDK.js b/BMSPushSDK.js index 98f438d..e0c2668 100644 --- a/BMSPushSDK.js +++ b/BMSPushSDK.js @@ -288,7 +288,7 @@ function BMSPush() { const SERVICE_WORKER = 'BMSPushServiceWorker.js'; function getBrowser() { - if (window.navigator.userAgent.indexOf("Chrome") != -1 && chrome.runtime.getManifest) { + if (window.navigator.userAgent.indexOf("Chrome") != -1 && chrome.runtime && chrome.runtime.getManifest) { return CHROME_EXTENSION; } let userAgentOfBrowser = navigator.userAgent.toLowerCase();