mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
🚱 Clear config subscriptions when unobserving
This commit is contained in:
committed by
Kevin Sawicki & Nathan Sobo
parent
2bca1abb2a
commit
f42bd3f34b
@@ -4,5 +4,6 @@ module.exports =
|
||||
@configSubscriptions[keyPath] = config.observe(keyPath, args...)
|
||||
|
||||
unobserveConfig: ->
|
||||
for keyPath, subscription of @configSubscriptions ? {}
|
||||
subscription.cancel()
|
||||
if @configSubscriptions?
|
||||
subscription.cancel() for keyPath, subscription of @configSubscriptions
|
||||
@configSubscriptions = null
|
||||
|
||||
Reference in New Issue
Block a user