mirror of
https://github.com/atom/atom.git
synced 2026-02-16 17:45:24 -05:00
Slightly more correct
This commit is contained in:
@@ -17,7 +17,7 @@ module.exports =
|
||||
@subscriptions.push(cancel: -> view.off eventName, callback)
|
||||
|
||||
unsubscribe: (object) ->
|
||||
if object
|
||||
if object?
|
||||
for subscription in @subscriptionsByObject?.get(object) ? []
|
||||
subscription.cancel()
|
||||
_.remove(@subscriptions, subscription)
|
||||
|
||||
Reference in New Issue
Block a user