Only beep when there is a workspace

Some specs might not create one.
This commit is contained in:
Ben Ogle
2014-12-02 15:52:37 -08:00
parent 491561db4a
commit ac23717f8c

View File

@@ -604,7 +604,7 @@ class Atom extends Model
# Essential: Visually and audibly trigger a beep.
beep: ->
shell.beep() if @config.get('core.audioBeep')
@__workspaceView.trigger 'beep'
@__workspaceView?.trigger 'beep'
@emitter.emit 'did-beep'
# Essential: A flexible way to open a dialog akin to an alert dialog.