Permalink
Browse files

Check wether window.CSSSupportsRule exists before using it

  • Loading branch information...
1 parent a43c3de commit f25d986a9e1216acdc17b7b996e745d4282a8c5c @SebastianZ SebastianZ committed May 7, 2013
Showing with 4 additions and 4 deletions.
  1. +2 −2 extension/content/firebug/chrome/reps.js
  2. +2 −2 extension/content/firebug/css/cssPanel.js
@@ -1712,7 +1712,7 @@ FirebugReps.CSSRule = domplate(Firebug.Rep,
{
return "CSSStyleRule";
}
- else if (rule instanceof window.CSSSupportsRule)
+ else if (window.CSSSupportsRule && rule instanceof window.CSSSupportsRule)
{
return "CSSSupportsRule";
}
@@ -1765,7 +1765,7 @@ FirebugReps.CSSRule = domplate(Firebug.Rep,
{
return rule.selectorText;
}
- else if (rule instanceof window.CSSSupportsRule)
+ else if (window.CSSSupportsRule && rule instanceof window.CSSSupportsRule)
{
return rule.conditionText;
}
@@ -569,7 +569,7 @@ Firebug.CSSStyleSheetPanel.prototype = Obj.extend(Firebug.Panel,
isSelectorEditable: true
});
}
- else if (rule instanceof window.CSSSupportsRule)
+ else if (window.CSSSupportsRule && rule instanceof window.CSSSupportsRule)
{
rules.push({
tag: CSSSupportsRuleTag.tag,
@@ -2056,7 +2056,7 @@ CSSEditor.prototype = domplate(Firebug.InlineEditor.prototype,
}
}
}
- else if (rule instanceof window.CSSSupportsRule &&
+ else if (window.CSSSupportsRule && rule instanceof window.CSSSupportsRule &&
Css.hasClass(target, "cssSupportsRuleCondition"))
{
target.textContent = value;

0 comments on commit f25d986

Please sign in to comment.