Null guard workspace element for deprecated update-available dispatch

This commit is contained in:
Nathan Sobo
2014-12-02 11:14:33 -07:00
parent 93bf9357b0
commit 01f87d9678

View File

@@ -32,7 +32,8 @@ class WindowEventHandler
# FIXME: Remove this when deprecations are removed
{releaseVersion, releaseNotes} = detail
detail = [releaseVersion, releaseNotes]
atom.commands.dispatch atom.views.getView(atom.workspace), "window:update-available", detail
if workspaceElement = atom.views.getView(atom.workspace)
atom.commands.dispatch workspaceElement, "window:update-available", detail
@subscribe ipc, 'command', (command, args...) ->
activeElement = document.activeElement