mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Guard against missing workspace view
This commit is contained in:
@@ -251,6 +251,8 @@ class AtomPackage extends Package
|
||||
@unsubscribeFromActivationEvents()
|
||||
|
||||
unsubscribeFromActivationEvents: ->
|
||||
return unless atom.workspaceView?
|
||||
|
||||
if _.isArray(@metadata.activationEvents)
|
||||
atom.workspaceView.off(event, @handleActivationEvent) for event in @metadata.activationEvents
|
||||
else if _.isString(@metadata.activationEvents)
|
||||
|
||||
Reference in New Issue
Block a user