Skip to content

Commit

Permalink
changing ListenerCompatUtil to use typeof when checking listener meth…
Browse files Browse the repository at this point in the history
…od is a function. fixes #1743
  • Loading branch information
danielo committed Nov 8, 2016
1 parent 895b332 commit c02aab7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ListenerCompatUtil.enhance = function(listenerMethod) {
notifyImmediately = method;
}
else {
if(!listener[method] || !(listener[method] instanceof Function)) {
if(!listener[method] || !(typeof listener[method] === 'function')) {
throw new TypeError("No such method '" + method + "' on the listener object.");
}

Expand Down

0 comments on commit c02aab7

Please sign in to comment.