Bug 1519616 - Clear theme preview for themes that don't have previews. r=aswan, a=RyanVM
authorMark Striemer <mstriemer@mozilla.com>
Tue, 15 Jan 2019 21:39:04 +0000
changeset 509524 86f5a024cd49e9485a91b89a826815fb0de507b1
parent 509523 2ea881a24d05154d0a048e06045f5b5e5ba08481
child 509525 ba59016735faa489660bb10bfae3e75b24537b3a
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan, RyanVM
bugs1519616
milestone65.0
Bug 1519616 - Clear theme preview for themes that don't have previews. r=aswan, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D16594
toolkit/mozapps/extensions/content/extensions.js
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -2610,23 +2610,22 @@ var gDetailView = {
   onUpdateModeChanged() {
     this.onPropertyChanged(["applyBackgroundUpdates"]);
   },
 
   _updateView(aAddon, aIsRemote, aScrollToPreferences) {
     setSearchLabel(aAddon.type);
 
     // Set the preview image for themes, if available.
+    this.headingImage.src = "";
     if (aAddon.type == "theme") {
       let previewURL = aAddon.screenshots && aAddon.screenshots[0] && aAddon.screenshots[0].url;
       if (previewURL) {
         this.headingImage.src = previewURL;
       }
-    } else {
-      this.headingImage.src = "";
     }
 
     AddonManager.addManagerListener(this);
     this.clearLoading();
 
     this._addon = aAddon;
     gEventManager.registerAddonListener(this, aAddon.id);
     gEventManager.registerInstallListener(this);