diff --git a/addons/web_editor/static/src/js/backend/html_field.js b/addons/web_editor/static/src/js/backend/html_field.js index cf57010ac4e..e1b1e4d1f09 100644 --- a/addons/web_editor/static/src/js/backend/html_field.js +++ b/addons/web_editor/static/src/js/backend/html_field.js @@ -307,7 +307,7 @@ export class HtmlField extends Component { * * @param {JQuery} $codeview */ - toggleCodeView (el = this.codeViewRef.el) { + toggleCodeView() { this.state.showCodeView = !this.state.showCodeView; this.wysiwyg.odooEditor.observerUnactive('toggleCodeView'); @@ -317,7 +317,7 @@ export class HtmlField extends Component { this.props.update(value); } else { this.wysiwyg.odooEditor.observerActive('toggleCodeView'); - const $codeview = $(el); + const $codeview = $(this.codeViewRef.el); const value = $codeview.val(); this.props.update(value);