diff --git a/build/media_src/editors/tinymce/js/tinymce.es6.js b/build/media_src/editors/tinymce/js/tinymce.es6.js index c3ce7165ce904..8ef31510c9d9f 100644 --- a/build/media_src/editors/tinymce/js/tinymce.es6.js +++ b/build/media_src/editors/tinymce/js/tinymce.es6.js @@ -82,14 +82,16 @@ buttonValues.push(tmp); }); - options.setup = (editor) => { - editor.addButton('jxtdbuttons', { - type: 'menubutton', - text: Joomla.JText._('PLG_TINY_CORE_BUTTONS'), - icon: 'none icon-joomla', - menu: buttonValues, - }); - }; + if (buttonValues.length) { + options.setup = (editor) => { + editor.addButton('jxtdbuttons', { + type: 'menubutton', + text: Joomla.JText._('PLG_TINY_CORE_BUTTONS'), + icon: 'none icon-joomla', + menu: buttonValues, + }); + }; + } // Create a new instance // eslint-disable-next-line no-undef