[FIX] web_editor: fix traceback when no image selected
closes odoo/odoo#77114 X-original-commit: aca97276446f8d9bd9977aeb665ae9a93d28a7bf Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -924,7 +924,7 @@ const Wysiwyg = Widget.extend({
|
||||
$node.replaceWith(element);
|
||||
this.odooEditor.unbreakableStepUnactive();
|
||||
this.odooEditor.historyStep();
|
||||
} else {
|
||||
} else if (element) {
|
||||
this.odooEditor.execCommand('insertHTML', element.outerHTML);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user