Don't assume there is a rootView in window.reload

This was causing an error when specs where reloaded.
This commit is contained in:
Corey Johnson
2012-11-16 09:47:32 -08:00
parent 61ce3b0f1a
commit bc95ae9f3e

View File

@@ -81,7 +81,7 @@ windowAdditions =
console.error "Failed to load extension named '#{name}'"
reload: ->
if rootView.getModifiedBuffers().length > 0
if rootView?.getModifiedBuffers().length > 0
atom.confirm(
"There are unsaved buffers, reload anyway?",
"You will lose all unsaved changes if you reload",