[FIX] web_editor: correct check of 'rules' property

see issue #22517
This commit is contained in:
Géry Debongnie
2018-02-05 20:24:23 +01:00
parent b08185fc66
commit a98beb13db
@@ -13,7 +13,7 @@ var getMatchedCSSRules = function (a) {
var sheets = document.styleSheets;
for(var i = sheets.length-1; i >= 0 ; i--) {
var rules;
if (sheets[i].rules) {
if (sheets[i].hasOwnProperty('rules')) {
rules = sheets[i].rules;
} else {
//try...catch because Firefox not able to enumerate document.styleSheets[].cssRules[] for cross-domain stylesheets.