Guard against null rootView

This will be the case for the config window.
This commit is contained in:
Kevin Sawicki
2013-06-12 13:13:22 -07:00
parent 0723514fea
commit e5b8aa57d7

View File

@@ -13,7 +13,7 @@ class WindowEventHandler
@subscribe $(window), 'focus', -> $("body").removeClass('is-blurred')
@subscribe $(window), 'blur', -> $("body").addClass('is-blurred')
@subscribe $(window), 'window:open-path', (event, pathToOpen) ->
rootView.open(pathToOpen) unless fsUtils.isDirectory(pathToOpen)
rootView?.open(pathToOpen) unless fsUtils.isDirectory(pathToOpen)
@subscribeToCommand $(window), 'window:toggle-full-screen', => atom.toggleFullScreen()
@subscribeToCommand $(window), 'window:close', =>