Skip to content

Commit

Permalink
web_editor: correct check of 'rules' property
Browse files Browse the repository at this point in the history
see issue odoo#22517
  • Loading branch information
ged-odoo authored and leemannd committed Apr 26, 2018
1 parent f2076e0 commit c200d2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/web_editor/static/src/js/transcoder.js
Expand Up @@ -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.
Expand Down

0 comments on commit c200d2e

Please sign in to comment.