diff --git a/api/js/etemplate/et2_widget_htmlarea.js b/api/js/etemplate/et2_widget_htmlarea.js
index 2a05826247..44c3ca4c48 100644
--- a/api/js/etemplate/et2_widget_htmlarea.js
+++ b/api/js/etemplate/et2_widget_htmlarea.js
@@ -307,7 +307,12 @@ var et2_htmlarea = /** @class */ (function (_super) {
};
et2_htmlarea.prototype.destroy = function () {
if (this.editor) {
- this.editor.destroy();
+ try {
+ this.editor.destroy();
+ }
+ catch (e) {
+ egw().debug("Error destroying editor", e);
+ }
}
this.editor = null;
this.tinymce = null;
diff --git a/api/js/etemplate/et2_widget_htmlarea.ts b/api/js/etemplate/et2_widget_htmlarea.ts
index 542f8004e2..c8ce495203 100644
--- a/api/js/etemplate/et2_widget_htmlarea.ts
+++ b/api/js/etemplate/et2_widget_htmlarea.ts
@@ -469,7 +469,14 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
{
if (this.editor)
{
- this.editor.destroy();
+ try
+ {
+ this.editor.destroy();
+ }
+ catch(e)
+ {
+ egw().debug("Error destroying editor",e);
+ }
}
this.editor = null;
this.tinymce = null;