Bug 1241024 - follow-up to fix eslint failure, rs=bustage-fix.
authorFlorian Quèze <florian@queze.net>
Thu, 18 Oct 2018 18:53:54 +0200
changeset 490256 6669d853e36620b01b035409ddc14ce8281ac5ae
parent 490255 fc8ae615f7268108e364437b261bccc2ba65c1bb
child 490257 0ff0b54b9ec7c3e99acf8987b63995dbdce3e64a
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersbustage-fix
bugs1241024
milestone64.0a1
Bug 1241024 - follow-up to fix eslint failure, rs=bustage-fix.
toolkit/components/aboutperformance/content/aboutPerformance.js
--- a/toolkit/components/aboutperformance/content/aboutPerformance.js
+++ b/toolkit/components/aboutperformance/content/aboutPerformance.js
@@ -1007,21 +1007,20 @@ var View = {
     this._fragment = document.createDocumentFragment();
   },
   appendRow(name, energyImpact, tooltip, type, image = "") {
     let row = document.createElement("tr");
 
     let elt = document.createElement("td");
     if (typeof name == "string") {
       elt.textContent = name;
+    } else if (name.title) {
+      document.l10n.setAttributes(elt, name.id, {title: name.title});
     } else {
-      if (name.title)
-        document.l10n.setAttributes(elt, name.id, {title: name.title});
-      else
-        document.l10n.setAttributes(elt, name.id);
+      document.l10n.setAttributes(elt, name.id);
     }
     if (image)
       elt.style.backgroundImage = `url('${image}')`;
 
     if (["subframe", "tracker", "worker"].includes(type))
       elt.classList.add("indent");
     else
       elt.classList.add("root");