GodMadeIncubus/jQuery-contextMenu — comment on commit 84ce8be8453eab4b0a7cf9cbf185bf706c24cd8b
File:  line 0
By rodneyrehm:

If you call `$.contextMenu` without specifying any items, the Error "No Items Specified" is thrown in [line 1092](https://github.com/medialize/jQuery-contextMenu/blob/gh-pages/src/jquery.contextMenu.js#L1092). I chose to throw an error here, because it makes no sense to register a menu without any menu-items.

The same applies to the dynamically built menu. If the menu simply doesn't show, a developer would have to realize on his own, that his items are missing. From my POV, this makes one bad API. I'm not sure if I want to throw errors in event handlers, though. jQuery tends to throw them away, so you're still none the wiser.

Simply not displaying the menu is not really an option for me, if there's a better way. We could talk about adding a new option that allows you to prevent contextMenu from building/showing nothing.

I'm not sure how I want to handle this, yet.