Browse files

Fixing Issue #93 - key "watch" might translate to Object.prototype.wa…

…tch in callbacks map
  • Loading branch information...
1 parent b0dc4eb commit fa4e281e48b580ed4434f891faa5424ba58b24d0 @rodneyrehm rodneyrehm committed Nov 30, 2012
Showing with 4 additions and 1 deletion.
  1. +3 −0 README.md
  2. +1 −1 src/jquery.contextMenu.js
View
3 README.md
@@ -103,6 +103,9 @@ $.contextMenu is published under the [MIT license](http://www.opensource.org/lic
## Changelog ##
+* adding [DOM Element bound context menus](http://medialize.github.com/jQuery-contextMenu/demo/on-dom-element.html) - ([Issue 88](https://github.com/medialize/jQuery-contextMenu/issues/88))
+* fixing key "watch" might translate to Object.prototype.watch in callbacks map - ([Issue 93](https://github.com/medialize/jQuery-contextMenu/issues/93))
+
### 1.5.25 ###
* upgrading to jQuery 1.8.2 ([Issue 78](https://github.com/medialize/jQuery-contextMenu/issues/78))
View
2 src/jquery.contextMenu.js
@@ -722,7 +722,7 @@ var // currently active contextMenu trigger
e.preventDefault();
e.stopImmediatePropagation();
- if ($.isFunction(root.callbacks[key])) {
+ if ($.isFunction(root.callbacks[key]) && Object.prototype.hasOwnProperty.call(root.callbacks, key)) {
// item-specific callback
callback = root.callbacks[key];
} else if ($.isFunction(root.callback)) {

0 comments on commit fa4e281

Please sign in to comment.