summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/transcoder.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2016-01-28 10:56:01 +0100
committerChristophe Matthieu <chm@odoo.com>2016-01-28 14:57:21 +0100
commit2b4fb7e195f1baa7164ad6e7e9ae039f9ff0b044 (patch)
tree7b0e2b952752f36a139b2c1fc4bb9f6e8d2c472b /addons/web_editor/static/src/js/transcoder.js
parent28e2dcf043dd853938b1bb385f81fa285b4df567 (diff)
[FIX] web_editor: remove style attribute if empty
Diffstat (limited to 'addons/web_editor/static/src/js/transcoder.js')
-rw-r--r--addons/web_editor/static/src/js/transcoder.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/transcoder.js b/addons/web_editor/static/src/js/transcoder.js
index 20779bf19aa..4b613ba636c 100644
--- a/addons/web_editor/static/src/js/transcoder.js
+++ b/addons/web_editor/static/src/js/transcoder.js
@@ -173,7 +173,11 @@ var class_to_style = function ($editable) {
style = k+":"+v+";"+style;
}
});
- $target.attr("style", style);
+ if (_.isEmpty(style)) {
+ $target.removeAttr("style");
+ } else {
+ $target.attr("style", style);
+ }
});
};
// convert style into inline class from mail