From 1e8d966938dd36ec5e23d845536ec61de36cf696 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 11 Mar 2018 18:59:21 -0400 Subject: [PATCH] fix regression in Firefox legacy version --- src/js/assets.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/assets.js b/src/js/assets.js index eb2e773db..a15b06e33 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -913,10 +913,13 @@ var updateFirst = function() { // Allow self-hosted dev build to update: if update_url is present but // null, assume the extension is hosted on AMO. if ( noRemoteResources === undefined ) { - var manifest = chrome.runtime.getManifest(); + var manifest = + typeof browser === 'object' && + browser.runtime.getManifest(); noRemoteResources = typeof vAPI.webextFlavor === 'string' && vAPI.webextFlavor.startsWith('Mozilla-Firefox-') && + manifest instanceof Object && manifest.applications instanceof Object && manifest.applications.gecko instanceof Object && manifest.applications.gecko.update_url === null;