MDL-82724 editor_tiny: Harden check for quicktoolbar and contextmenu

This commit is contained in:
Philipp Memmel 2024-08-06 15:53:39 +02:00
parent e0381615aa
commit ac7cecfb37
3 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -198,7 +198,7 @@ export const addMenubarItem = (menubar, section, menuitem, after = null) => {
* @returns {string}
*/
export const addContextmenuItem = (contextmenu, ...menuitems) => {
const contextmenuItems = (contextmenu ?? '').split(' ');
const contextmenuItems = (contextmenu ? contextmenu : '').split(' ');
return contextmenuItems
.concat(menuitems)
@ -214,7 +214,7 @@ export const addContextmenuItem = (contextmenu, ...menuitems) => {
* @returns {string}
*/
export const addQuickbarsToolbarItem = (quicktoolbar, ...toolbaritems) => {
const quicktoolbarItems = (quicktoolbar ?? '').split(' ');
const quicktoolbarItems = (quicktoolbar ? quicktoolbar : '').split(' ');
return quicktoolbarItems
.concat(toolbaritems)