Skip to content

Commit fa4e281

Browse files
committed
Fixing Issue swisnl#93 - key "watch" might translate to Object.prototype.watch in callbacks map
1 parent b0dc4eb commit fa4e281

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ $.contextMenu is published under the [MIT license](http://www.opensource.org/lic
103103

104104
## Changelog ##
105105

106+
* 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))
107+
* fixing key "watch" might translate to Object.prototype.watch in callbacks map - ([Issue 93](https://github.com/medialize/jQuery-contextMenu/issues/93))
108+
106109
### 1.5.25 ###
107110

108111
* upgrading to jQuery 1.8.2 ([Issue 78](https://github.com/medialize/jQuery-contextMenu/issues/78))

src/jquery.contextMenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ var // currently active contextMenu trigger
722722
e.preventDefault();
723723
e.stopImmediatePropagation();
724724

725-
if ($.isFunction(root.callbacks[key])) {
725+
if ($.isFunction(root.callbacks[key]) && Object.prototype.hasOwnProperty.call(root.callbacks, key)) {
726726
// item-specific callback
727727
callback = root.callbacks[key];
728728
} else if ($.isFunction(root.callback)) {

0 commit comments

Comments
 (0)