Permalink
Browse files

remove some logs, add safety check

  • Loading branch information...
1 parent 5d1c8df commit 825816159791359329afa2c0b40d018f3b27a2d7 @jldailey committed Apr 4, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 bling.coffee
View
@@ -1946,7 +1946,6 @@ Object.Extend Event,
archive_trim = 100 # how much to trim all at once if we go over the maximum
publish = (e, args = []) ->
- $.log "published: #{e}", args
archive[e] ?= []
archive[e].push(args)
if archive[e].length > archive_limit
@@ -1962,15 +1961,15 @@ Object.Extend Event,
if replay # replay the publish archive
archive[e] ?= []
for args in archive[e]
- $.log "replayed: #{e}", args
func.apply null, args
func
unsubscribe = (e, func) ->
if not func?
subscribers[e] = []
else
- i = subscribers[e]?.indexOf(func)
+ subscribers[e] ?= []
+ i = subscribers[e].indexOf(func)
if i > -1
subscribers[e].splice(i,i)

0 comments on commit 8258161

Please sign in to comment.