Skip to content

Commit

Permalink
Merge pull request pulsar-edit#151 from Sertonix/unmerge-menu-seperators
Browse files Browse the repository at this point in the history
unmerge menus ignore seperators
  • Loading branch information
mauricioszabo authored Nov 19, 2022
2 parents 7de77d2 + 879f795 commit 2d88e44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/menu-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function unmerge(menu, item) {
}
}

if (matchingItem.submenu == null || matchingItem.submenu.length === 0) {
if (matchingItem.submenu == null || matchingItem.submenu.filter( ({type}) => type !== 'separator' ).length === 0) {
menu.splice(matchingItemIndex, 1);
}
}
Expand Down

0 comments on commit 2d88e44

Please sign in to comment.