From cd309aae03286a527e3f960f8b29f796fb3bc853 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Sun, 10 Mar 2019 22:06:34 -0500 Subject: [PATCH] Prevent JS error in Chrome while emulating mobile devices --- js/messaging.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/messaging.js b/js/messaging.js index 93a4e5a7..f47d9425 100644 --- a/js/messaging.js +++ b/js/messaging.js @@ -18,9 +18,9 @@ if (!CHROME && !chrome.browserAction.openPopup) { // in FF pre-57 legacy addons can override useragent so we assume the worst // until we know for sure in the async getBrowserInfo() // (browserAction.openPopup was added in 57) - FIREFOX = browser.runtime.getBrowserInfo ? 51 : 50; + FIREFOX = browserApi.runtime.getBrowserInfo ? 51 : 50; // getBrowserInfo was added in FF 51 - Promise.resolve(FIREFOX >= 51 ? browser.runtime.getBrowserInfo() : {version: 50}).then(info => { + Promise.resolve(FIREFOX >= 51 ? browserApi.runtime.getBrowserInfo() : {version: 50}).then(info => { FIREFOX = parseFloat(info.version); document.documentElement.classList.add('moz-appearance-bug', FIREFOX && FIREFOX < 54); });