diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-02-10 18:37:01 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-02-10 18:37:01 +0100 |
| commit | d70fde0330550d510668e49807da83e646e8ccec (patch) | |
| tree | 45b4341700b65eabbc0043c476e5f9a7d48edf5f /addons/web_editor/static/src/js/transcoder.js | |
| parent | 469e04e97c2aa60d9d41bd430e0aeba77ee6f9dd (diff) | |
| parent | cab5c480e204f7546646fd8884b72d2efa9e09f7 (diff) | |
[MERGE] forward port of branch saas-7 up to cab5c48
Diffstat (limited to 'addons/web_editor/static/src/js/transcoder.js')
| -rw-r--r-- | addons/web_editor/static/src/js/transcoder.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/transcoder.js b/addons/web_editor/static/src/js/transcoder.js index 361c072a48c..11397063200 100644 --- a/addons/web_editor/static/src/js/transcoder.js +++ b/addons/web_editor/static/src/js/transcoder.js @@ -84,7 +84,7 @@ var getMatchedCSSRules = function (a) { var style = {}; _.each(css, function (v,k) { _.each(v[1], function (v,k) { - if (v && k.indexOf('-webkit') === -1 && (!style[k] || style[k].indexOf('important') === -1 || v.indexOf('important') !== -1)) { + if (v && _.isString(v) && k.indexOf('-webkit') === -1 && (!style[k] || style[k].indexOf('important') === -1 || v.indexOf('important') !== -1)) { style[k] = v; } }); @@ -195,7 +195,7 @@ var style_to_class = function ($editable) { style = k+":"+v+";"+style; } }); - css = $c.attr("style", style).attr("style").split(/\s*;\s*/); + css = ($c.attr("style", style).attr("style") || "").split(/\s*;\s*/); style = $target.attr("style") || ""; _.each(css, function (v) { style = style.replace(v, ''); |
