Skip to content

Commit

Permalink
[FIX] web_editor_class_selector: Avoid errors when custom CSS class i…
Browse files Browse the repository at this point in the history
…s not present

Go to the website
Open the editor
Add text and select it, a traceback is shown
  • Loading branch information
carlos-lopez-tecnativa committed Sep 27, 2024
1 parent b3d68c7 commit f1b94ad
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {OdooEditor} from "@web_editor/js/editor/odoo-editor/src/OdooEditor";
patch(OdooEditor.prototype, "web_editor_class_selector.OdooEditor", {
_updateToolbar(show) {
const res = this._super(show);
if (!this.toolbar) {
if (!this.toolbar || !this.custom_class_css) {
return res;
}
const sel = this.document.getSelection();
Expand Down

0 comments on commit f1b94ad

Please sign in to comment.