mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
Etemplate: Catch errors when destroying editor so we can see what's going on, and not break
This commit is contained in:
parent
74a7d6ee8b
commit
8ec1e46ea4
@ -307,8 +307,13 @@ var et2_htmlarea = /** @class */ (function (_super) {
|
|||||||
};
|
};
|
||||||
et2_htmlarea.prototype.destroy = function () {
|
et2_htmlarea.prototype.destroy = function () {
|
||||||
if (this.editor) {
|
if (this.editor) {
|
||||||
|
try {
|
||||||
this.editor.destroy();
|
this.editor.destroy();
|
||||||
}
|
}
|
||||||
|
catch (e) {
|
||||||
|
egw().debug("Error destroying editor", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
this.editor = null;
|
this.editor = null;
|
||||||
this.tinymce = null;
|
this.tinymce = null;
|
||||||
this.tinymce_container = null;
|
this.tinymce_container = null;
|
||||||
|
@ -468,9 +468,16 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
|
|||||||
destroy()
|
destroy()
|
||||||
{
|
{
|
||||||
if (this.editor)
|
if (this.editor)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
this.editor.destroy();
|
this.editor.destroy();
|
||||||
}
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
egw().debug("Error destroying editor",e);
|
||||||
|
}
|
||||||
|
}
|
||||||
this.editor = null;
|
this.editor = null;
|
||||||
this.tinymce = null;
|
this.tinymce = null;
|
||||||
this.tinymce_container = null;
|
this.tinymce_container = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user