Check if CKEDITOR is defined, before updating them.

This commit is contained in:
Jan Böhmer 2019-04-05 13:08:26 +02:00
parent f872f4a80c
commit 6ae1429868

View file

@ -251,13 +251,14 @@ class AjaxUI {
beforeSerialize: function() : boolean { beforeSerialize: function() : boolean {
//Update the content of textarea fields using CKEDITOR before submitting. //Update the content of textarea fields using CKEDITOR before submitting.
//@ts-ignore //@ts-ignore
for(let name in CKEDITOR.instances) if(typeof CKEDITOR !== 'undefined') {
{ //@ts-ignore
for (let name in CKEDITOR.instances) {
//@ts-ignore //@ts-ignore
CKEDITOR.instances[name].updateElement(); CKEDITOR.instances[name].updateElement();
} }
}
return true; return true;
}, },