I had this question after viewing The Menu is good, but needs a couple of Tweaks
The DIV structure is generated via reading a JSON file and programmatically building the DIVs with whatever nesting the JSON file specifies. On occasion, the JSON file can only have a top level link and the sub menu is empty. The generated structure works but displays an empty node.
Is there any way to hide empty sub-menus?
I will attach a picture demonstrating the issue and the section of the DIV structure that produces it.
Here is the associated html fragment which produces it
<div class="col_1 sub-menu-item">
</div><!-- Close Col Div -->