1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Insert divider in menu by calling RED.menu.addItem('id', null);

This commit is contained in:
Thierry Le Gal 2019-10-07 14:47:20 +02:00
parent f75dd2209d
commit 5056203023

View File

@ -244,7 +244,7 @@ RED.menu = (function() {
function addItem(id,opt) { function addItem(id,opt) {
var item = createMenuItem(opt); var item = createMenuItem(opt);
if (opt.group) { if (opt !== null && opt.group) {
var groupItems = $("#"+id+"-submenu").children(".red-ui-menu-group-"+opt.group); var groupItems = $("#"+id+"-submenu").children(".red-ui-menu-group-"+opt.group);
if (groupItems.length === 0) { if (groupItems.length === 0) {
item.appendTo("#"+id+"-submenu"); item.appendTo("#"+id+"-submenu");