Skip to content

Commit

Permalink
Merge pull request #2 from azethoth/patch-1
Browse files Browse the repository at this point in the history
fix param names for 'on' and 'off' method calls
  • Loading branch information
arbales committed Dec 12, 2012
2 parents ce54fdb + 6bfba93 commit 497da93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions observer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ createListener = (target, events, callback, context) ->

# Backbone >= 0.9.0, Backbone-compatible objects
else if target.on
target.on(events, handler, context)
target.on(events, callback, context)
else
throw new TypeError "Expected an EventEmitter or Backbone.Events-compatible target."

Expand All @@ -65,7 +65,7 @@ destroyListener = (target, events, callback) ->

# Backbone >= 0.9.0, Backbone-compatible objects
else if target.off
target.off(events, handler)
target.off(events, callback)
else
throw new TypeError "Expected an EventEmitter or Backbone.Events-compatible target."

Expand Down

0 comments on commit 497da93

Please sign in to comment.