diff options
| author | remi-filament <30716308+remi-filament@users.noreply.github.com> | 2018-02-05 20:21:45 +0100 |
|---|---|---|
| committer | ged-odoo <ged@odoo.com> | 2018-02-05 20:21:45 +0100 |
| commit | 160ddc8567c60493ea077033aa44e1f4139fec41 (patch) | |
| tree | fbd3929808edb39b5a38268f00a4a7e895b6b67f /addons/web_editor/static/src/js/transcoder.js | |
| parent | e5f2e6d3908bc4bfc397ef9ef164219e5fb50acc (diff) | |
[FIX] web_editor: correct check of property 'rules'
Port of PR #22603 from v9 to v10
See Issue #22517
(#22679)
Diffstat (limited to 'addons/web_editor/static/src/js/transcoder.js')
| -rw-r--r-- | addons/web_editor/static/src/js/transcoder.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/transcoder.js b/addons/web_editor/static/src/js/transcoder.js index 6b42e028b3a..265ca5ab3f0 100644 --- a/addons/web_editor/static/src/js/transcoder.js +++ b/addons/web_editor/static/src/js/transcoder.js @@ -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. |
