mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user