Add string case to unsubscribeFromActivationEvents()

This commit is contained in:
Kevin Sawicki 2013-05-22 14:03:35 -07:00
parent 571c953e51
commit 51cd8cc977

View File

@ -152,6 +152,8 @@ class AtomPackage extends Package
unsubscribeFromActivationEvents: ->
if _.isArray(@metadata.activationEvents)
rootView.off(event, @handleActivationEvent) for event in @metadata.activationEvents
else if _.isString(@metadata.activationEvents)
rootView.off(@metadata.activationEvents, @handleActivationEvent)
else
rootView.off(event, selector, @handleActivationEvent) for event, selector of @metadata.activationEvents