fix regression in Firefox legacy version

This commit is contained in:
Raymond Hill 2018-03-11 18:59:21 -04:00
parent eb789939ca
commit 1e8d966938
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 4 additions and 1 deletions

View File

@ -913,10 +913,13 @@ var updateFirst = function() {
// Allow self-hosted dev build to update: if update_url is present but // Allow self-hosted dev build to update: if update_url is present but
// null, assume the extension is hosted on AMO. // null, assume the extension is hosted on AMO.
if ( noRemoteResources === undefined ) { if ( noRemoteResources === undefined ) {
var manifest = chrome.runtime.getManifest(); var manifest =
typeof browser === 'object' &&
browser.runtime.getManifest();
noRemoteResources = noRemoteResources =
typeof vAPI.webextFlavor === 'string' && typeof vAPI.webextFlavor === 'string' &&
vAPI.webextFlavor.startsWith('Mozilla-Firefox-') && vAPI.webextFlavor.startsWith('Mozilla-Firefox-') &&
manifest instanceof Object &&
manifest.applications instanceof Object && manifest.applications instanceof Object &&
manifest.applications.gecko instanceof Object && manifest.applications.gecko instanceof Object &&
manifest.applications.gecko.update_url === null; manifest.applications.gecko.update_url === null;