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