summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/transcoder.js
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2016-02-08 16:08:32 +0100
committerDenis Ledoux <dle@odoo.com>2016-02-08 16:08:32 +0100
commiteb2346ba469a7e74920154fc886613dd284ee37f (patch)
treedad225b6fcae4bfd294eee8bd4065ebc862dd42a /addons/web_editor/static/src/js/transcoder.js
parent36b26ebaae67ce3c058761cf5b09c95168a4463d (diff)
parent0b7990cbce29324b3a804f2cafea9a3f0068fa15 (diff)
[MERGE] forward port of branch 9.0 up to 0b7990c
Diffstat (limited to 'addons/web_editor/static/src/js/transcoder.js')
-rw-r--r--addons/web_editor/static/src/js/transcoder.js4
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 4b613ba636c..14461ba1cf6 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, '');