Merge pull request #7200 from atom/mb-guard-get-load-settings

Guard for atom windows w/ no webContents
This commit is contained in:
Max Brunsfeld
2015-06-09 17:21:44 -07:00

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))