Etemplate: Catch errors when destroying editor so we can see what's going on, and not break

This commit is contained in:
nathangray 2021-04-21 15:38:10 -06:00
parent 74a7d6ee8b
commit 8ec1e46ea4
2 changed files with 14 additions and 2 deletions

View File

@ -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;

View File

@ -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;