diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-01-06 12:13:13 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2015-01-08 11:01:42 +0100 |
| commit | ce1583bf83ce01a07b0fc292dd665cccb18293ee (patch) | |
| tree | 1e1ba3f6a8475fd78905918a2c210efc6473a27e | |
| parent | 79ae96be00fd5c8983a0b235ea90883bdc08134d (diff) | |
[FIX] website editor: can't find font ifone or more css files are empty
| -rw-r--r-- | addons/website/static/src/js/website.editor.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js index 12d1b157736..c8ce1e68973 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -2105,11 +2105,13 @@ define(['summernote/summernote'], function () { var sheets = document.styleSheets; for(var i = 0; i < sheets.length; i++) { var rules = sheets[i].rules || sheets[i].cssRules; - for(var r = 0; r < rules.length; r++) { - var selectorText = rules[r].selectorText; - if (selectorText) { - var match = selectorText.match(filter); - if (match) classes.push(match[1].slice(1, match[1].length)); + if (rules) { + for(var r = 0; r < rules.length; r++) { + var selectorText = rules[r].selectorText; + if (selectorText) { + var match = selectorText.match(filter); + if (match) classes.push(match[1].slice(1, match[1].length)); + } } } } |
