Merge pull request #2314 from ThierryLeGal/addItem-insert-divider

Insert divider in menu by calling RED.menu.addItem('id', null);
This commit is contained in:
Nick O'Leary 2019-10-10 14:29:14 +01:00 committed by GitHub
commit bf65dcd49b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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