Bug 1377326 - Don't assume targets are tabs in style-editor media sidebar; r=ntim
MozReview-Commit-ID: KJczS4aEAUS
--- a/devtools/client/styleeditor/StyleEditorUI.jsm
+++ b/devtools/client/styleeditor/StyleEditorUI.jsm
@@ -894,17 +894,17 @@ StyleEditorUI.prototype = {
div.addEventListener("click",
this._jumpToLocation.bind(this, location));
let cond = this._panelDoc.createElement("div");
cond.className = "media-rule-condition";
if (!rule.matches) {
cond.classList.add("media-condition-unmatched");
}
- if (this._target.tab.tagName == "tab") {
+ if (this._target.isLocalTab) {
this._setConditionContents(cond, rule.conditionText);
} else {
cond.textContent = rule.conditionText;
}
div.appendChild(cond);
let link = this._panelDoc.createElement("div");
link.className = "media-rule-line theme-link";