Don't parse empty strings as JSON

windowState can be an empty string which should not be attempted to be
parsed.
This commit is contained in:
Kevin Sawicki
2013-10-04 13:00:02 -07:00
parent 791d288175
commit 80a9cebbef

View File

@@ -244,7 +244,7 @@ class Atom
documentStateJson = @getLoadSettings().windowState
try
documentState = JSON.parse(documentStateJson) if documentStateJson?
documentState = JSON.parse(documentStateJson) if documentStateJson
catch error
console.warn "Error parsing window state: #{windowStatePath}", error.stack, error