summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/transcoder.js
diff options
context:
space:
mode:
authorremi-filament <30716308+remi-filament@users.noreply.github.com>2018-02-05 20:21:45 +0100
committerged-odoo <ged@odoo.com>2018-02-05 20:21:45 +0100
commit160ddc8567c60493ea077033aa44e1f4139fec41 (patch)
treefbd3929808edb39b5a38268f00a4a7e895b6b67f /addons/web_editor/static/src/js/transcoder.js
parente5f2e6d3908bc4bfc397ef9ef164219e5fb50acc (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.js2
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.