Skip to content

Commit

Permalink
Guard against null rootView
Browse files Browse the repository at this point in the history
This will be the case for the config window.
  • Loading branch information
kevinsawicki committed Jun 12, 2013
1 parent 0723514 commit e5b8aa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/window-event-handler.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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', =>
Expand Down

0 comments on commit e5b8aa5

Please sign in to comment.