From 3e9eba3f0166feb829378a64fd1549c0ca084cd1 Mon Sep 17 00:00:00 2001 From: Gijs Date: Mon, 14 Aug 2017 21:42:28 +0100 Subject: [PATCH] Deal with lack of MOZ_PHOTON_THEME on 57+ --- addon/bootstrap.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addon/bootstrap.js b/addon/bootstrap.js index 1d477c543a..800ad668d3 100644 --- a/addon/bootstrap.js +++ b/addon/bootstrap.js @@ -230,7 +230,9 @@ let photonPageAction; // Does nothing otherwise. Ideally, in the future, WebExtension page actions // and Photon page actions would be one in the same, but they aren't right now. function initPhotonPageAction(api) { - if (!AppConstants.MOZ_PHOTON_THEME) { + // The MOZ_PHOTON_THEME ifdef got removed, but we need to support 55 and 56 as well, + // so check if the property exists *and* is false before bailing. + if (typeof AppConstants.MOZ_PHOTON_THEME != "undefined" && !AppConstants.MOZ_PHOTON_THEME) { // Photon not supported. Use the WebExtension's browser action. return; }