summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static/src/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