diff --git a/src/bundle/Resources/public/js/CKEditor/custom-tags/ui/custom-tag-attributes-view.js b/src/bundle/Resources/public/js/CKEditor/custom-tags/ui/custom-tag-attributes-view.js index 4343a651..4a20b4f0 100644 --- a/src/bundle/Resources/public/js/CKEditor/custom-tags/ui/custom-tag-attributes-view.js +++ b/src/bundle/Resources/public/js/CKEditor/custom-tags/ui/custom-tag-attributes-view.js @@ -60,7 +60,7 @@ class IbexaCustomTagAttributesView extends View { Object.entries(attributes).forEach(([name, config]) => { const value = values[name] === null || values[name] === undefined || values[name] === '' ? '-' : values[name]; - const getValueLabelMethods = window.ibexa.richText.CKEditor.customTags.getValueLabelMethods || {}; + const getValueLabelMethods = window.ibexa.richText.CKEditor.customTags?.getValueLabelMethods || {}; const valueLabel = getValueLabelMethods[name] && value !== '-' ? getValueLabelMethods[name](value, config) : value; children.push({ diff --git a/src/bundle/Resources/public/js/CKEditor/custom-tags/ui/custom-tag-form-view.js b/src/bundle/Resources/public/js/CKEditor/custom-tags/ui/custom-tag-form-view.js index 5d081c20..300f5efa 100644 --- a/src/bundle/Resources/public/js/CKEditor/custom-tags/ui/custom-tag-form-view.js +++ b/src/bundle/Resources/public/js/CKEditor/custom-tags/ui/custom-tag-form-view.js @@ -19,9 +19,9 @@ class IbexaCustomTagFormView extends View { this.saveButtonView = this.createButton('Save', null, 'ck-button-save', 'save-custom-tag'); this.cancelButtonView = this.createButton('Cancel', null, 'ck-button-cancel', 'cancel-custom-tag'); - const attributeRenderMethods = window.ibexa.richText.CKEditor.customTags.attributeRenderMethods || {}; - const setValueMethods = window.ibexa.richText.CKEditor.customTags.setValueMethods || {}; - const getValueMethods = window.ibexa.richText.CKEditor.customTags.getValueMethods || {}; + const attributeRenderMethods = window.ibexa.richText.CKEditor.customTags?.attributeRenderMethods || {}; + const setValueMethods = window.ibexa.richText.CKEditor.customTags?.setValueMethods || {}; + const getValueMethods = window.ibexa.richText.CKEditor.customTags?.getValueMethods || {}; this.attributeViews = {}; this.attributeRenderMethods = {