From 96e9f65b86f1ea37771a1e98df9be4d012f05101 Mon Sep 17 00:00:00 2001 From: ralf Date: Thu, 9 Jun 2022 13:32:22 +0200 Subject: [PATCH] fixed terser error caused by not supported optional chaining operator (?.) --- mail/js/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index cda7118bab..3e9a6c1574 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -5633,7 +5633,8 @@ app.classes.mail = AppJS.extend( } // apply default font and -size before submitting to server for sending - this.et2?.getWidgetById('mail_htmltext')?.applyDefaultFont(); + const htmlarea = this.et2 ? this.et2.getWidgetById('mail_htmltext') : null; + if (htmlarea) htmlarea.applyDefaultFont(); return false; }, @@ -6504,4 +6505,4 @@ app.classes.mail = AppJS.extend( resizable: false, }, et2_dialog._create_parent('mail')); } -}); +}); \ No newline at end of file