Skip to content

Commit

Permalink
fix error message on missing event callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Otto Allmendinger committed Feb 16, 2012
1 parent e5db1c9 commit 5071967
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backbone.js
Expand Up @@ -1125,7 +1125,7 @@
for (var key in events) {
var method = events[key];
if (!_.isFunction(method)) method = this[events[key]];
if (!method) throw new Error('Event "' + events[key] + '" does not exist');
if (!method) throw new Error('Method "' + events[key] + '" does not exist');
var match = key.match(eventSplitter);
var eventName = match[1], selector = match[2];
method = _.bind(method, this);
Expand Down

0 comments on commit 5071967

Please sign in to comment.