Guard for atom windows w/ no webContents

This commit is contained in:
Max Brunsfeld
2015-06-09 16:45:14 -07:00
parent f2851ac11d
commit 6bccfcd0a3

View File

@@ -87,7 +87,7 @@ class AtomWindow
hash: encodeURIComponent(JSON.stringify(loadSettings))
getLoadSettings: ->
if @browserWindow.webContents.loaded
if @browserWindow.webContents?.loaded
hash = url.parse(@browserWindow.webContents.getUrl()).hash.substr(1)
JSON.parse(decodeURIComponent(hash))