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

Port of PR #22603 from v9 to v10
See Issue #22517

 (#22679)
This commit is contained in:
remi-filament
2018-02-05 20:21:45 +01:00
committed by ged-odoo
parent e5f2e6d390
commit 160ddc8567
2 changed files with 2 additions and 2 deletions
@@ -9,7 +9,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.
+1 -1
View File
@@ -8,4 +8,4 @@ declaration.
Signed,
Rémi CAZENAVE remi@le-filament.com https://github.com/remi-filament
Rémi CAZENAVE 30716308+remi-filament@users.noreply.github.com https://github.com/remi-filament