[FIX] web_editor: prevent traceback on remove flex styles
A traceback was triggered when removing flex styles in convert_inline. This is fixed by iterating over the styles rather that over all keys of the style object. task-2697159 closes odoo/odoo#81540 X-original-commit: 18db94d9fc320c35e811d991fc4a32533d481083 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -284,7 +284,7 @@ function classToStyle($editable, cssRules) {
|
||||
const $target = $(node);
|
||||
const css = _getMatchedCSSRules(node, cssRules);
|
||||
// Flexbox
|
||||
for (const styleName in node.style) {
|
||||
for (const styleName of node.style) {
|
||||
if (styleName.includes('flex') || `${node.style[styleName]}`.includes('flex')) {
|
||||
node.style[styleName] = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user