From 6ae142986820cc5ac0645e1bc0a3460429c0b8df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Fri, 5 Apr 2019 13:08:26 +0200 Subject: [PATCH] Check if CKEDITOR is defined, before updating them. --- assets/ts_src/ajax_ui.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/ts_src/ajax_ui.ts b/assets/ts_src/ajax_ui.ts index 313d986f..105c8f78 100644 --- a/assets/ts_src/ajax_ui.ts +++ b/assets/ts_src/ajax_ui.ts @@ -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;